Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The generated response MUST follow these rules:
- The response can contain one or more A2UI JSON blocks.
- Each A2UI JSON block MUST be wrapped in literal `<a2ui-json>` and `</a2ui-json>` tags (always include both the opening and closing tags; do NOT wrap the tags in backticks or replace the opening tag with a markdown code fence such as ```json).
- Between or around these blocks, you can provide conversational text.
- The JSON part MUST be a single, raw JSON object (usually a list of A2UI messages) and MUST validate against the provided A2UI JSON SCHEMA.
- The JSON part MUST be a JSON array of A2UI messages, each following the provided A2UI JSON SCHEMA.
- Top-Down Component Ordering: Within the `components` list of a message:
- The 'root' component MUST be the FIRST element.
- Parent components MUST appear before their child components.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The generated response MUST follow these rules:
- The response can contain one or more A2UI JSON blocks.
- Each A2UI JSON block MUST be wrapped in literal `<a2ui-json>` and `</a2ui-json>` tags (always include both the opening and closing tags; do NOT wrap the tags in backticks or replace the opening tag with a markdown code fence such as ```json).
- Between or around these blocks, you can provide conversational text.
- The JSON part MUST be a single, raw JSON object (usually a list of A2UI messages) and MUST validate against the provided A2UI JSON SCHEMA.
- The JSON part MUST be a JSON array of A2UI messages, each following the provided A2UI JSON SCHEMA.
- Top-Down Component Ordering: Within the `components` list of a message:
- The 'root' component MUST be the FIRST element.
- Parent components MUST appear before their child components.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The generated response MUST follow these rules:
- The response can contain one or more A2UI JSON blocks.
- Each A2UI JSON block MUST be wrapped in literal `<a2ui-json>` and `</a2ui-json>` tags (always include both the opening and closing tags; do NOT wrap the tags in backticks or replace the opening tag with a markdown code fence such as ```json).
- Between or around these blocks, you can provide conversational text.
- The JSON part MUST be a single, raw JSON object (usually a list of A2UI messages) and MUST validate against the provided A2UI JSON SCHEMA.
- The JSON part MUST be a JSON array of A2UI messages, each following the provided A2UI JSON SCHEMA.
- Top-Down Component Ordering: Within the `components` list of a message:
- The 'root' component MUST be the FIRST element.
- Parent components MUST appear before their child components.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The generated response MUST follow these rules:
- The response can contain one or more A2UI JSON blocks.
- Each A2UI JSON block MUST be wrapped in literal `<a2ui-json>` and `</a2ui-json>` tags (always include both the opening and closing tags; do NOT wrap the tags in backticks or replace the opening tag with a markdown code fence such as ```json).
- Between or around these blocks, you can provide conversational text.
- The JSON part MUST be a single, raw JSON object (usually a list of A2UI messages) and MUST validate against the provided A2UI JSON SCHEMA.
- The JSON part MUST be a JSON array of A2UI messages, each following the provided A2UI JSON SCHEMA.
- Top-Down Component Ordering: Within the `components` list of a message:
- The 'root' component MUST be the FIRST element.
- Parent components MUST appear before their child components.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The generated response MUST follow these rules:
- The response can contain one or more A2UI JSON blocks.
- Each A2UI JSON block MUST be wrapped in literal `<a2ui-json>` and `</a2ui-json>` tags (always include both the opening and closing tags; do NOT wrap the tags in backticks or replace the opening tag with a markdown code fence such as ```json).
- Between or around these blocks, you can provide conversational text.
- The JSON part MUST be a single, raw JSON object (usually a list of A2UI messages) and MUST validate against the provided A2UI JSON SCHEMA.
- The JSON part MUST be a JSON array of A2UI messages, each following the provided A2UI JSON SCHEMA.
- Top-Down Component Ordering: Within the `components` list of a message:
- The 'root' component MUST be the FIRST element.
- Parent components MUST appear before their child components.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The generated response MUST follow these rules:
- The response can contain one or more A2UI JSON blocks.
- Each A2UI JSON block MUST be wrapped in literal `<a2ui-json>` and `</a2ui-json>` tags (always include both the opening and closing tags; do NOT wrap the tags in backticks or replace the opening tag with a markdown code fence such as ```json).
- Between or around these blocks, you can provide conversational text.
- The JSON part MUST be a single, raw JSON object (usually a list of A2UI messages) and MUST validate against the provided A2UI JSON SCHEMA.
- The JSON part MUST be a JSON array of A2UI messages, each following the provided A2UI JSON SCHEMA.
- Top-Down Component Ordering: Within the `components` list of a message:
- The 'root' component MUST be the FIRST element.
- Parent components MUST appear before their child components.
Expand Down
2 changes: 1 addition & 1 deletion conformance/test_data/prompts/direct_json/two_catalogs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The generated response MUST follow these rules:
- The response can contain one or more A2UI JSON blocks.
- Each A2UI JSON block MUST be wrapped in literal `<a2ui-json>` and `</a2ui-json>` tags (always include both the opening and closing tags; do NOT wrap the tags in backticks or replace the opening tag with a markdown code fence such as ```json).
- Between or around these blocks, you can provide conversational text.
- The JSON part MUST be a single, raw JSON object (usually a list of A2UI messages) and MUST validate against the provided A2UI JSON SCHEMA.
- The JSON part MUST be a JSON array of A2UI messages, each following the provided A2UI JSON SCHEMA.
- Top-Down Component Ordering: Within the `components` list of a message:
- The 'root' component MUST be the FIRST element.
- Parent components MUST appear before their child components.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The generated response MUST follow these rules:
- The response can contain one or more A2UI JSON blocks.
- Each A2UI JSON block MUST be wrapped in literal `<a2ui-json>` and `</a2ui-json>` tags (always include both the opening and closing tags; do NOT wrap the tags in backticks or replace the opening tag with a markdown code fence such as ```json).
- Between or around these blocks, you can provide conversational text.
- The JSON part MUST be a single, raw JSON object (usually a list of A2UI messages) and MUST validate against the provided A2UI JSON SCHEMA.
- The JSON part MUST be a JSON array of A2UI messages, each following the provided A2UI JSON SCHEMA.
- Top-Down Component Ordering: Within the `components` list of a message:
- The 'root' component MUST be the FIRST element.
- Parent components MUST appear before their child components.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The generated response MUST follow these rules:
- The response can contain one or more A2UI JSON blocks.
- Each A2UI JSON block MUST be wrapped in literal `<a2ui-json>` and `</a2ui-json>` tags (always include both the opening and closing tags; do NOT wrap the tags in backticks or replace the opening tag with a markdown code fence such as ```json).
- Between or around these blocks, you can provide conversational text.
- The JSON part MUST be a single, raw JSON object (usually a list of A2UI messages) and MUST validate against the provided A2UI JSON SCHEMA.
- The JSON part MUST be a JSON array of A2UI messages, each following the provided A2UI JSON SCHEMA.
- Top-Down Component Ordering: Within the `components` list of a message:
- The 'root' component MUST be the FIRST element.
- Parent components MUST appear before their child components.
Expand Down
4 changes: 4 additions & 0 deletions dart/a2ui_agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@
as part of a string or comment.
- An Express integer too large for `int` compiles to a double instead of
throwing `FormatException`.
- The Direct JSON prompt rule says the JSON part is a JSON array of A2UI
messages, each following the schema, instead of "a single, raw JSON object
(usually a list of A2UI messages)" that "MUST validate" against it
([#3721](https://github.com/a2ui-project/a2ui/pull/3721)).

## 0.0.1-wip005

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The generated response MUST follow these rules:
- The response can contain one or more A2UI JSON blocks.
- Each A2UI JSON block MUST be wrapped in literal `<a2ui-json>` and `</a2ui-json>` tags (always include both the opening and closing tags; do NOT wrap the tags in backticks or replace the opening tag with a markdown code fence such as ```json).
- Between or around these blocks, you can provide conversational text.
- The JSON part MUST be a single, raw JSON object (usually a list of A2UI messages) and MUST validate against the provided A2UI JSON SCHEMA.
- The JSON part MUST be a JSON array of A2UI messages, each following the provided A2UI JSON SCHEMA.
- Top-Down Component Ordering: Within the `components` list of a message:
- The 'root' component MUST be the FIRST element.
- Parent components MUST appear before their child components.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ object A2uiConstants {
1. The response can contain one or more A2UI JSON blocks.
2. Each A2UI JSON block MUST be wrapped in $A2UI_OPEN_TAG and $A2UI_CLOSE_TAG tags.
3. Between or around these blocks, you can provide conversational text.
4. The JSON part MUST be a single, raw JSON object (usually a list of A2UI messages) and MUST validate against the provided A2UI JSON SCHEMA.
4. The JSON part MUST be a JSON array of A2UI messages, each following the provided A2UI JSON SCHEMA.
"""
}
1 change: 1 addition & 0 deletions python/a2ui_agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
`generate_base_rules()` with `schema_to_prompt()` (such as
`SendA2uiToClientToolset` users) should use `DEFAULT_WORKFLOW_RULES` instead.
[#3559](https://github.com/a2ui-project/a2ui/pull/3559)
- The Direct JSON prompt rule says the JSON part is a JSON array of A2UI messages, each following the schema, instead of "a single, raw JSON object (usually a list of A2UI messages)" that "MUST validate" against it. [#3721](https://github.com/a2ui-project/a2ui/pull/3721)
- `open_stream` takes `after_rejected_block="continue"` to read past a
rejected block. The stream then returns an `ErrorPart` in its place, skips
the rest of the block, and reads the text and blocks after it; the messages
Expand Down
2 changes: 1 addition & 1 deletion python/a2ui_agent/src/a2ui/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
- The response can contain one or more A2UI JSON blocks.
- Each A2UI JSON block MUST be wrapped in literal `{A2UI_OPEN_TAG}` and `{A2UI_CLOSE_TAG}` tags (always include both the opening and closing tags; do NOT wrap the tags in backticks or replace the opening tag with a markdown code fence such as ```json).
- Between or around these blocks, you can provide conversational text.
- The JSON part MUST be a single, raw JSON object (usually a list of A2UI messages) and MUST validate against the provided A2UI JSON SCHEMA.
- The JSON part MUST be a JSON array of A2UI messages, each following the provided A2UI JSON SCHEMA.
- Top-Down Component Ordering: Within the `components` list of a message:
- The 'root' component MUST be the FIRST element.
- Parent components MUST appear before their child components.
Expand Down
1 change: 1 addition & 0 deletions typescript/agents/a2ui_agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- **BREAKING CHANGE**: When `ResponseStream.feed` or `close` throws, the error's `partialResults` holds the parts the call made ready before the failure, as for `parseResponse`, and they stay applied to the stream's `RendererState`. Before, a chunk that finished a block and then failed in the next one threw without those parts and rolled them back. Recommended migration: show `error.partialResults` before ending the stream. [#3597](https://github.com/a2ui-project/a2ui/issues/3597)
- **BREAKING CHANGE**: `ResponseStream` has an `isInBlock` getter, so a custom implementation must add one, and takes a type parameter for the parts it returns (`ResponseStream<StreamPart>` for a stream that reads past rejected blocks, `ResponseStream` by default). `DirectJsonResponseStream`'s constructor takes `(parser, {wrapped, state, afterRejectedBlock})` instead of `(parser, wrapped, state)`; `DirectJsonParser.openStream` builds it as before. [#3597](https://github.com/a2ui-project/a2ui/issues/3597)
- **BREAKING CHANGE**: Remove cross-catalog `$ref` resolution across peer catalogs, which shipped in 0.0.1. `resolveCatalogs` returns the active catalogs as is instead of copies linked to each other and to the registered catalogs, and `DirectJsonFormat`, `DirectJsonPromptGenerator`, `DirectJsonParser`, payload validation and the Express schema helpers no longer link the catalogs they are given (`linkCatalogs`, `inlinePeerAndLocalRefs` and `Catalog.withPeerCatalogs` are removed from `@a2ui/web_core`). A catalog's `$ref`s resolve only against its own document and `common_types.json`, and loading a v1.0 catalog with a `$ref` to any other document, such as another catalog, throws `A2uiCatalogError` from `Catalog.fromJson`. Recommended migration: copy the referenced definitions into each catalog that uses them. [#3232](https://github.com/a2ui-project/a2ui/issues/3232), [#3575](https://github.com/a2ui-project/a2ui/pull/3575)
- The Direct JSON prompt rule says the JSON part is a JSON array of A2UI messages, each following the schema, instead of "a single, raw JSON object (usually a list of A2UI messages)" that "MUST validate" against it. [#3721](https://github.com/a2ui-project/a2ui/pull/3721)
- `openStream` takes `afterRejectedBlock: 'continue'` (`StreamOptions`, `ContinuingStreamOptions`) to read past a rejected block. The stream then returns an `ErrorPart` (`{type: 'error', error}`) in its place, skips the rest of the block, and reads the text and blocks after it; the messages the block emitted before it was rejected stay in the state. A block still open when the response ends is returned as an `ErrorPart` too. `feed` and `close` of such a stream return `StreamPart`s (`ResponsePart | ErrorPart`); by default the first rejected block still ends the stream. [#3597](https://github.com/a2ui-project/a2ui/issues/3597)
- Add `ResponseStream.isInBlock`, which tells whether the response read so far ends inside a block, so a client that joins the chunks of a paused and resumed response can tell whether a space between them could break a block. [#3597](https://github.com/a2ui-project/a2ui/issues/3597)
- Add `RendererState.of(processor)`, a renderer state that checks messages by its own rules and applies them to the `MessageProcessor` an app renders from, for an app that is both agent and renderer. A rollback takes a message back out of the processor's model. Every `RendererState` now hands a `callRendererFunction` to its processor only once the outermost `apply` or transaction it was applied in succeeds. [#3597](https://github.com/a2ui-project/a2ui/issues/3597)
Expand Down
2 changes: 1 addition & 1 deletion typescript/agents/a2ui_agent/src/parser/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The generated response MUST follow these rules:
- The response can contain one or more A2UI JSON blocks.
- Each A2UI JSON block MUST be wrapped in literal \`${A2UI_OPEN_TAG}\` and \`${A2UI_CLOSE_TAG}\` tags (always include both the opening and closing tags; do NOT wrap the tags in backticks or replace the opening tag with a markdown code fence such as \`\`\`json).
- Between or around these blocks, you can provide conversational text.
- The JSON part MUST be a single, raw JSON object (usually a list of A2UI messages) and MUST validate against the provided A2UI JSON SCHEMA.
- The JSON part MUST be a JSON array of A2UI messages, each following the provided A2UI JSON SCHEMA.
- Top-Down Component Ordering: Within the \`components\` list of a message:
- The 'root' component MUST be the FIRST element.
- Parent components MUST appear before their child components.
Expand Down
Loading