ag-ui-validate 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/README.md +77 -10
  2. package/dist/{catalog-Ci9dqc1a.cjs → catalog-AB5vuZ8j.cjs} +3 -3
  3. package/dist/catalog-AB5vuZ8j.cjs.map +1 -0
  4. package/dist/{catalog-BglXBNbL.js → catalog-DqTI4VLt.js} +3 -3
  5. package/dist/catalog-DqTI4VLt.js.map +1 -0
  6. package/dist/cli.js +107 -55
  7. package/dist/cli.js.map +1 -1
  8. package/dist/index.cjs +2 -2
  9. package/dist/index.js +2 -2
  10. package/dist/report.cjs +43 -1
  11. package/dist/report.cjs.map +1 -1
  12. package/dist/report.d.cts +7 -1
  13. package/dist/report.d.ts +7 -1
  14. package/dist/report.js +43 -2
  15. package/dist/report.js.map +1 -1
  16. package/dist/{src-HmI-kxef.cjs → src-D04i3Vso.cjs} +2 -2
  17. package/dist/src-D04i3Vso.cjs.map +1 -0
  18. package/dist/{src-rGZ2G4qA.js → src-Dcuqz2QC.js} +2 -2
  19. package/dist/src-Dcuqz2QC.js.map +1 -0
  20. package/dist/transport.cjs +1 -1
  21. package/dist/transport.cjs.map +1 -1
  22. package/dist/transport.js +1 -1
  23. package/dist/transport.js.map +1 -1
  24. package/dist/vitest.js +2 -2
  25. package/dist/vitest.js.map +1 -1
  26. package/{src → js/src}/cli-args.ts +11 -0
  27. package/{src → js/src}/cli.ts +8 -3
  28. package/{src → js/src}/report/index.ts +1 -1
  29. package/{src → js/src}/report/pretty.ts +43 -0
  30. package/{src → js/src}/rules/catalog.ts +1 -1
  31. package/{src → js/src}/transport/index.ts +1 -1
  32. package/package.json +14 -13
  33. package/{src/rules → spec}/catalog.json +1 -1
  34. package/spec/event-categories.json +56 -0
  35. package/spec/fixtures/README.md +91 -0
  36. package/spec/fixtures/invalid/AGUI001-first-event-not-run-started/expected.json +10 -0
  37. package/spec/fixtures/invalid/AGUI001-first-event-not-run-started/stream.jsonl +4 -0
  38. package/spec/fixtures/invalid/AGUI002-duplicate-run-started/expected.json +11 -0
  39. package/spec/fixtures/invalid/AGUI002-duplicate-run-started/stream.jsonl +3 -0
  40. package/spec/fixtures/invalid/AGUI003-run-never-terminated/expected.json +10 -0
  41. package/spec/fixtures/invalid/AGUI003-run-never-terminated/stream.jsonl +4 -0
  42. package/spec/fixtures/invalid/AGUI004-event-after-terminal/expected.json +11 -0
  43. package/spec/fixtures/invalid/AGUI004-event-after-terminal/stream.jsonl +3 -0
  44. package/spec/fixtures/invalid/AGUI005-finished-and-error/expected.json +11 -0
  45. package/spec/fixtures/invalid/AGUI005-finished-and-error/stream.jsonl +3 -0
  46. package/spec/fixtures/invalid/AGUI006-step-finished-unmatched/expected.json +11 -0
  47. package/spec/fixtures/invalid/AGUI006-step-finished-unmatched/stream.jsonl +3 -0
  48. package/spec/fixtures/invalid/AGUI007-step-unterminated/expected.json +10 -0
  49. package/spec/fixtures/invalid/AGUI007-step-unterminated/stream.jsonl +3 -0
  50. package/spec/fixtures/invalid/AGUI008-unstable-run-ids/expected.json +12 -0
  51. package/spec/fixtures/invalid/AGUI008-unstable-run-ids/stream.jsonl +2 -0
  52. package/spec/fixtures/invalid/AGUI101-content-without-start/expected.json +11 -0
  53. package/spec/fixtures/invalid/AGUI101-content-without-start/stream.jsonl +3 -0
  54. package/spec/fixtures/invalid/AGUI102-end-without-start/expected.json +11 -0
  55. package/spec/fixtures/invalid/AGUI102-end-without-start/stream.jsonl +3 -0
  56. package/spec/fixtures/invalid/AGUI103-message-unterminated/expected.json +10 -0
  57. package/spec/fixtures/invalid/AGUI103-message-unterminated/stream.jsonl +4 -0
  58. package/spec/fixtures/invalid/AGUI104-duplicate-message-id/expected.json +12 -0
  59. package/spec/fixtures/invalid/AGUI104-duplicate-message-id/stream.jsonl +6 -0
  60. package/spec/fixtures/invalid/AGUI105-empty-content-delta/expected.json +12 -0
  61. package/spec/fixtures/invalid/AGUI105-empty-content-delta/stream.jsonl +5 -0
  62. package/spec/fixtures/invalid/AGUI106-interleaved-same-message-id/expected.json +12 -0
  63. package/spec/fixtures/invalid/AGUI106-interleaved-same-message-id/stream.jsonl +5 -0
  64. package/spec/fixtures/invalid/AGUI201-args-without-start/expected.json +11 -0
  65. package/spec/fixtures/invalid/AGUI201-args-without-start/stream.jsonl +3 -0
  66. package/spec/fixtures/invalid/AGUI202-end-without-start/expected.json +11 -0
  67. package/spec/fixtures/invalid/AGUI202-end-without-start/stream.jsonl +3 -0
  68. package/spec/fixtures/invalid/AGUI203-unterminated-tool-call/expected.json +10 -0
  69. package/spec/fixtures/invalid/AGUI203-unterminated-tool-call/stream.jsonl +4 -0
  70. package/spec/fixtures/invalid/AGUI204-args-not-json/expected.json +10 -0
  71. package/spec/fixtures/invalid/AGUI204-args-not-json/stream.jsonl +6 -0
  72. package/spec/fixtures/invalid/AGUI205-duplicate-tool-call-id/expected.json +12 -0
  73. package/spec/fixtures/invalid/AGUI205-duplicate-tool-call-id/stream.jsonl +5 -0
  74. package/spec/fixtures/invalid/AGUI206-result-before-end/expected.json +12 -0
  75. package/spec/fixtures/invalid/AGUI206-result-before-end/stream.jsonl +5 -0
  76. package/spec/fixtures/invalid/AGUI207-result-unknown-id/expected.json +11 -0
  77. package/spec/fixtures/invalid/AGUI207-result-unknown-id/stream.jsonl +3 -0
  78. package/spec/fixtures/invalid/AGUI208-unknown-parent-message-id/expected.json +11 -0
  79. package/spec/fixtures/invalid/AGUI208-unknown-parent-message-id/stream.jsonl +4 -0
  80. package/spec/fixtures/invalid/AGUI301-delta-before-snapshot/expected.json +10 -0
  81. package/spec/fixtures/invalid/AGUI301-delta-before-snapshot/stream.jsonl +3 -0
  82. package/spec/fixtures/invalid/AGUI302-delta-failed-to-apply/expected.json +11 -0
  83. package/spec/fixtures/invalid/AGUI302-delta-failed-to-apply/stream.jsonl +4 -0
  84. package/spec/fixtures/invalid/AGUI303-invalid-patch-document/expected.json +11 -0
  85. package/spec/fixtures/invalid/AGUI303-invalid-patch-document/stream.jsonl +4 -0
  86. package/spec/fixtures/invalid/AGUI304-midrun-snapshot-discards-deltas/expected.json +10 -0
  87. package/spec/fixtures/invalid/AGUI304-midrun-snapshot-discards-deltas/stream.jsonl +5 -0
  88. package/spec/fixtures/invalid/AGUI305-shared-state-never-established/expected.json +9 -0
  89. package/spec/fixtures/invalid/AGUI305-shared-state-never-established/options.json +5 -0
  90. package/spec/fixtures/invalid/AGUI305-shared-state-never-established/stream.jsonl +5 -0
  91. package/spec/fixtures/invalid/AGUI401-reasoning-content-without-start/expected.json +11 -0
  92. package/spec/fixtures/invalid/AGUI401-reasoning-content-without-start/stream.jsonl +3 -0
  93. package/spec/fixtures/invalid/AGUI402-reasoning-unterminated/expected.json +10 -0
  94. package/spec/fixtures/invalid/AGUI402-reasoning-unterminated/stream.jsonl +3 -0
  95. package/spec/fixtures/invalid/AGUI501-missing-data-prefix/expected.json +9 -0
  96. package/spec/fixtures/invalid/AGUI501-missing-data-prefix/scenario.json +17 -0
  97. package/spec/fixtures/invalid/AGUI502-payload-not-json/expected.json +10 -0
  98. package/spec/fixtures/invalid/AGUI502-payload-not-json/stream.jsonl +3 -0
  99. package/spec/fixtures/invalid/AGUI503-unknown-event-type/expected.json +10 -0
  100. package/spec/fixtures/invalid/AGUI503-unknown-event-type/stream.jsonl +3 -0
  101. package/spec/fixtures/invalid/AGUI504-schema-violation/expected.json +11 -0
  102. package/spec/fixtures/invalid/AGUI504-schema-violation/stream.jsonl +4 -0
  103. package/spec/fixtures/invalid/AGUI505-unexpected-content-type/expected.json +9 -0
  104. package/spec/fixtures/invalid/AGUI505-unexpected-content-type/scenario.json +25 -0
  105. package/spec/fixtures/invalid/AGUI506-keepalive-gap/expected.json +9 -0
  106. package/spec/fixtures/invalid/AGUI506-keepalive-gap/scenario.json +25 -0
  107. package/spec/fixtures/invalid/AGUI507-buffered-response/expected.json +9 -0
  108. package/spec/fixtures/invalid/AGUI507-buffered-response/scenario.json +9 -0
  109. package/spec/fixtures/invalid/AGUI508-connection-dropped/expected.json +17 -0
  110. package/spec/fixtures/invalid/AGUI508-connection-dropped/scenario.json +10 -0
  111. package/spec/fixtures/invalid/AGUI901-raw-wraps-typed-event/expected.json +11 -0
  112. package/spec/fixtures/invalid/AGUI901-raw-wraps-typed-event/stream.jsonl +3 -0
  113. package/spec/fixtures/invalid/AGUI902-no-timestamps/expected.json +9 -0
  114. package/spec/fixtures/invalid/AGUI902-no-timestamps/stream.jsonl +2 -0
  115. package/spec/fixtures/invalid/AGUI903-custom-name-not-namespaced/expected.json +11 -0
  116. package/spec/fixtures/invalid/AGUI903-custom-name-not-namespaced/stream.jsonl +3 -0
  117. package/spec/fixtures/valid/agentic-chat.jsonl +14 -0
  118. package/spec/fixtures/valid/agentic-generative-ui.jsonl +13 -0
  119. package/spec/fixtures/valid/backend-tool-rendering.jsonl +14 -0
  120. package/spec/fixtures/valid/human-in-the-loop.jsonl +13 -0
  121. package/spec/fixtures/valid/predictive-state-updates.expected.json +11 -0
  122. package/spec/fixtures/valid/predictive-state-updates.jsonl +11 -0
  123. package/spec/fixtures/valid/shared-state.jsonl +8 -0
  124. package/spec/fixtures/valid/tool-based-generative-ui.jsonl +5 -0
  125. package/dist/catalog-BglXBNbL.js.map +0 -1
  126. package/dist/catalog-Ci9dqc1a.cjs.map +0 -1
  127. package/dist/src-HmI-kxef.cjs.map +0 -1
  128. package/dist/src-rGZ2G4qA.js.map +0 -1
  129. /package/{src → js/src}/index.ts +0 -0
  130. /package/{src → js/src}/protocol/event-table.ts +0 -0
  131. /package/{src → js/src}/protocol/jsonpatch.ts +0 -0
  132. /package/{src → js/src}/report/json.ts +0 -0
  133. /package/{src → js/src}/report/junit.ts +0 -0
  134. /package/{src → js/src}/report/sarif.ts +0 -0
  135. /package/{src → js/src}/rules/checks/context.ts +0 -0
  136. /package/{src → js/src}/rules/checks/lifecycle.ts +0 -0
  137. /package/{src → js/src}/rules/checks/reasoning.ts +0 -0
  138. /package/{src → js/src}/rules/checks/state.ts +0 -0
  139. /package/{src → js/src}/rules/checks/text.ts +0 -0
  140. /package/{src → js/src}/rules/checks/toolcalls.ts +0 -0
  141. /package/{src → js/src}/rules/checks/transport.ts +0 -0
  142. /package/{src → js/src}/transport/ndjson.ts +0 -0
  143. /package/{src → js/src}/transport/sse.ts +0 -0
  144. /package/{src → js/src}/types.ts +0 -0
  145. /package/{src → js/src}/vitest/index.ts +0 -0
  146. /package/{src → js/src}/vitest/matcher.ts +0 -0
@@ -0,0 +1,5 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300012500}
2
+ {"type":"TEXT_MESSAGE_START","messageId":"msg_001","role":"assistant","timestamp":1755300012600}
3
+ {"type":"TEXT_MESSAGE_START","messageId":"msg_001","role":"assistant","timestamp":1755300012700}
4
+ {"type":"TEXT_MESSAGE_END","messageId":"msg_001","timestamp":1755300012800}
5
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300012900}
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "rule": "AGUI201",
4
+ "severity": "error",
5
+ "message": "TOOL_CALL_ARGS for toolCallId 'call_ghost' with no open TOOL_CALL_START",
6
+ "eventIndex": 1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#tool-call-events",
8
+ "eventType": "TOOL_CALL_ARGS",
9
+ "pointer": "/toolCallId"
10
+ }
11
+ ]
@@ -0,0 +1,3 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300013000}
2
+ {"type":"TOOL_CALL_ARGS","toolCallId":"call_ghost","delta":"{}","timestamp":1755300013100}
3
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300013200}
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "rule": "AGUI202",
4
+ "severity": "error",
5
+ "message": "TOOL_CALL_END for toolCallId 'call_ghost' with no open TOOL_CALL_START",
6
+ "eventIndex": 1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#toolcallend",
8
+ "eventType": "TOOL_CALL_END",
9
+ "pointer": "/toolCallId"
10
+ }
11
+ ]
@@ -0,0 +1,3 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300013300}
2
+ {"type":"TOOL_CALL_END","toolCallId":"call_ghost","timestamp":1755300013400}
3
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300013500}
@@ -0,0 +1,10 @@
1
+ [
2
+ {
3
+ "rule": "AGUI203",
4
+ "severity": "error",
5
+ "message": "TOOL_CALL_START id 'call_7' never terminated",
6
+ "eventIndex": 3,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#tool-call-events",
8
+ "relatedEventIndex": 1
9
+ }
10
+ ]
@@ -0,0 +1,4 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300013600}
2
+ {"type":"TOOL_CALL_START","toolCallId":"call_7","toolCallName":"get_weather","timestamp":1755300013700}
3
+ {"type":"TOOL_CALL_ARGS","toolCallId":"call_7","delta":"{\"city\":\"Berlin\"}","timestamp":1755300013800}
4
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300013900}
@@ -0,0 +1,10 @@
1
+ [
2
+ {
3
+ "rule": "AGUI204",
4
+ "severity": "error",
5
+ "message": "Concatenated TOOL_CALL_ARGS for toolCallId 'call_001' do not parse as JSON: Unexpected token 'o', \"{\"city\":oops}\" is not valid JSON",
6
+ "eventIndex": 4,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#toolcallargs",
8
+ "relatedEventIndex": 1
9
+ }
10
+ ]
@@ -0,0 +1,6 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300014000}
2
+ {"type":"TOOL_CALL_START","toolCallId":"call_001","toolCallName":"get_weather","timestamp":1755300014100}
3
+ {"type":"TOOL_CALL_ARGS","toolCallId":"call_001","delta":"{\"city\":","timestamp":1755300014200}
4
+ {"type":"TOOL_CALL_ARGS","toolCallId":"call_001","delta":"oops}","timestamp":1755300014300}
5
+ {"type":"TOOL_CALL_END","toolCallId":"call_001","timestamp":1755300014400}
6
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300014500}
@@ -0,0 +1,12 @@
1
+ [
2
+ {
3
+ "rule": "AGUI205",
4
+ "severity": "error",
5
+ "message": "toolCallId 'call_001' was already used by a completed tool call",
6
+ "eventIndex": 3,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#toolcallstart",
8
+ "eventType": "TOOL_CALL_START",
9
+ "pointer": "/toolCallId",
10
+ "relatedEventIndex": 2
11
+ }
12
+ ]
@@ -0,0 +1,5 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300014600}
2
+ {"type":"TOOL_CALL_START","toolCallId":"call_001","toolCallName":"get_weather","timestamp":1755300014700}
3
+ {"type":"TOOL_CALL_END","toolCallId":"call_001","timestamp":1755300014800}
4
+ {"type":"TOOL_CALL_START","toolCallId":"call_001","toolCallName":"get_weather","timestamp":1755300014900}
5
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300015000}
@@ -0,0 +1,12 @@
1
+ [
2
+ {
3
+ "rule": "AGUI206",
4
+ "severity": "warning",
5
+ "message": "TOOL_CALL_RESULT for toolCallId 'call_001' arrived while the call is still open",
6
+ "eventIndex": 2,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#toolcallresult",
8
+ "eventType": "TOOL_CALL_RESULT",
9
+ "pointer": "/toolCallId",
10
+ "relatedEventIndex": 1
11
+ }
12
+ ]
@@ -0,0 +1,5 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300015100}
2
+ {"type":"TOOL_CALL_START","toolCallId":"call_001","toolCallName":"get_weather","timestamp":1755300015200}
3
+ {"type":"TOOL_CALL_RESULT","messageId":"msg_001","toolCallId":"call_001","content":"early","timestamp":1755300015300}
4
+ {"type":"TOOL_CALL_END","toolCallId":"call_001","timestamp":1755300015400}
5
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300015500}
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "rule": "AGUI207",
4
+ "severity": "error",
5
+ "message": "TOOL_CALL_RESULT references toolCallId 'call_ghost', which was never started",
6
+ "eventIndex": 1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#toolcallresult",
8
+ "eventType": "TOOL_CALL_RESULT",
9
+ "pointer": "/toolCallId"
10
+ }
11
+ ]
@@ -0,0 +1,3 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300015600}
2
+ {"type":"TOOL_CALL_RESULT","messageId":"msg_001","toolCallId":"call_ghost","content":"orphan","timestamp":1755300015700}
3
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300015800}
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "rule": "AGUI208",
4
+ "severity": "info",
5
+ "message": "TOOL_CALL_START parentMessageId 'msg_ghost' matches no message observed in this stream",
6
+ "eventIndex": 1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#toolcallstart",
8
+ "eventType": "TOOL_CALL_START",
9
+ "pointer": "/parentMessageId"
10
+ }
11
+ ]
@@ -0,0 +1,4 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300015900}
2
+ {"type":"TOOL_CALL_START","toolCallId":"call_001","toolCallName":"get_weather","parentMessageId":"msg_ghost","timestamp":1755300016000}
3
+ {"type":"TOOL_CALL_END","toolCallId":"call_001","timestamp":1755300016100}
4
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300016200}
@@ -0,0 +1,10 @@
1
+ [
2
+ {
3
+ "rule": "AGUI301",
4
+ "severity": "info",
5
+ "message": "STATE_DELTA precedes any STATE_SNAPSHOT; the base it applies to is not observable on this stream",
6
+ "eventIndex": 1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#statesnapshot",
8
+ "eventType": "STATE_DELTA"
9
+ }
10
+ ]
@@ -0,0 +1,3 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300016300}
2
+ {"type":"STATE_DELTA","delta":[{"op":"add","path":"/a","value":1}],"timestamp":1755300016400}
3
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300016500}
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "rule": "AGUI302",
4
+ "severity": "error",
5
+ "message": "STATE_DELTA failed to apply: /items/3: '3' is not a valid index for an array of length 0",
6
+ "eventIndex": 2,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#statedelta",
8
+ "eventType": "STATE_DELTA",
9
+ "pointer": "/delta/0"
10
+ }
11
+ ]
@@ -0,0 +1,4 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300016600}
2
+ {"type":"STATE_SNAPSHOT","snapshot":{"items":[]},"timestamp":1755300016700}
3
+ {"type":"STATE_DELTA","delta":[{"op":"replace","path":"/items/3","value":"x"}],"timestamp":1755300016800}
4
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300016900}
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "rule": "AGUI303",
4
+ "severity": "error",
5
+ "message": "STATE_DELTA is not a valid RFC 6902 patch document: operation 0 has invalid op 'merge'",
6
+ "eventIndex": 2,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#statedelta",
8
+ "eventType": "STATE_DELTA",
9
+ "pointer": "/delta/0/op"
10
+ }
11
+ ]
@@ -0,0 +1,4 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300017000}
2
+ {"type":"STATE_SNAPSHOT","snapshot":{},"timestamp":1755300017100}
3
+ {"type":"STATE_DELTA","delta":[{"op":"merge","path":"/a","value":1}],"timestamp":1755300017200}
4
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300017300}
@@ -0,0 +1,10 @@
1
+ [
2
+ {
3
+ "rule": "AGUI304",
4
+ "severity": "info",
5
+ "message": "STATE_SNAPSHOT replaces state previously built from 1 delta(s)",
6
+ "eventIndex": 3,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#statesnapshot",
8
+ "eventType": "STATE_SNAPSHOT"
9
+ }
10
+ ]
@@ -0,0 +1,5 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300017400}
2
+ {"type":"STATE_SNAPSHOT","snapshot":{"a":1},"timestamp":1755300017500}
3
+ {"type":"STATE_DELTA","delta":[{"op":"replace","path":"/a","value":2}],"timestamp":1755300017600}
4
+ {"type":"STATE_SNAPSHOT","snapshot":{"a":99},"timestamp":1755300017700}
5
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300017800}
@@ -0,0 +1,9 @@
1
+ [
2
+ {
3
+ "rule": "AGUI305",
4
+ "severity": "warning",
5
+ "message": "features include 'shared-state' but no STATE_SNAPSHOT was emitted",
6
+ "eventIndex": -1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#state-management-events"
8
+ }
9
+ ]
@@ -0,0 +1,5 @@
1
+ {
2
+ "features": [
3
+ "shared-state"
4
+ ]
5
+ }
@@ -0,0 +1,5 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300017900}
2
+ {"type":"TEXT_MESSAGE_START","messageId":"msg_001","role":"assistant","timestamp":1755300018000}
3
+ {"type":"TEXT_MESSAGE_CONTENT","messageId":"msg_001","delta":"No state events at all.","timestamp":1755300018100}
4
+ {"type":"TEXT_MESSAGE_END","messageId":"msg_001","timestamp":1755300018200}
5
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300018300}
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "rule": "AGUI401",
4
+ "severity": "error",
5
+ "message": "REASONING_MESSAGE_CONTENT for messageId 'rmsg_ghost' with no open REASONING_MESSAGE_START",
6
+ "eventIndex": 1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#reasoningmessagecontent",
8
+ "eventType": "REASONING_MESSAGE_CONTENT",
9
+ "pointer": "/messageId"
10
+ }
11
+ ]
@@ -0,0 +1,3 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300018400}
2
+ {"type":"REASONING_MESSAGE_CONTENT","messageId":"rmsg_ghost","delta":"orphan","timestamp":1755300018500}
3
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300018600}
@@ -0,0 +1,10 @@
1
+ [
2
+ {
3
+ "rule": "AGUI402",
4
+ "severity": "warning",
5
+ "message": "REASONING_START messageId 'rsn_001' never ended",
6
+ "eventIndex": 2,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#reasoning-events",
8
+ "relatedEventIndex": 1
9
+ }
10
+ ]
@@ -0,0 +1,3 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300018700}
2
+ {"type":"REASONING_START","messageId":"rsn_001","timestamp":1755300018800}
3
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300018900}
@@ -0,0 +1,9 @@
1
+ [
2
+ {
3
+ "rule": "AGUI501",
4
+ "severity": "error",
5
+ "message": "Malformed SSE framing: line '{\"type\":\"CUSTOM\",\"name\":\"acme.ping\",\"value\":1,\"timestamp\":17…' looks like a JSON payload but lacks the 'data:' field prefix, so SSE clients silently drop it",
6
+ "eventIndex": -1,
7
+ "specUrl": "https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation"
8
+ }
9
+ ]
@@ -0,0 +1,17 @@
1
+ {
2
+ "contentType": "text/event-stream",
3
+ "chunks": [
4
+ {
5
+ "gapMs": 0,
6
+ "text": "data: {\"type\":\"RUN_STARTED\",\"threadId\":\"thread_001\",\"runId\":\"run_001\",\"timestamp\":1755300020500}\n\n"
7
+ },
8
+ {
9
+ "gapMs": 0,
10
+ "text": "{\"type\":\"CUSTOM\",\"name\":\"acme.ping\",\"value\":1,\"timestamp\":1755300020600}\n\n"
11
+ },
12
+ {
13
+ "gapMs": 0,
14
+ "text": "data: {\"type\":\"RUN_FINISHED\",\"threadId\":\"thread_001\",\"runId\":\"run_001\",\"outcome\":{\"type\":\"success\"},\"timestamp\":1755300020700}\n\n"
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,10 @@
1
+ [
2
+ {
3
+ "rule": "AGUI502",
4
+ "severity": "error",
5
+ "message": "Event payload is not valid JSON: Unexpected token 'b', \"{\"type\": broken json\" is not valid JSON",
6
+ "eventIndex": 1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#base-event-properties",
8
+ "eventType": ""
9
+ }
10
+ ]
@@ -0,0 +1,3 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300019000}
2
+ {"type": broken json
3
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300019100}
@@ -0,0 +1,10 @@
1
+ [
2
+ {
3
+ "rule": "AGUI503",
4
+ "severity": "error",
5
+ "message": "Unknown event type 'AGUI_PING' (not in the installed AG-UI SDK v0.0.58, and not RAW or CUSTOM)",
6
+ "eventIndex": 1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#event-types-overview",
8
+ "eventType": "AGUI_PING"
9
+ }
10
+ ]
@@ -0,0 +1,3 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300019200}
2
+ {"type":"AGUI_PING","timestamp":1755300019300}
3
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300019400}
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "rule": "AGUI504",
4
+ "severity": "error",
5
+ "message": "TOOL_CALL_START: missing required field 'toolCallName' (string)",
6
+ "eventIndex": 1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#base-event-properties",
8
+ "eventType": "TOOL_CALL_START",
9
+ "pointer": "/toolCallName"
10
+ }
11
+ ]
@@ -0,0 +1,4 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300019500}
2
+ {"type":"TOOL_CALL_START","toolCallId":"call_001","timestamp":1755300019600}
3
+ {"type":"TOOL_CALL_END","toolCallId":"call_001","timestamp":1755300019700}
4
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300019800}
@@ -0,0 +1,9 @@
1
+ [
2
+ {
3
+ "rule": "AGUI505",
4
+ "severity": "warning",
5
+ "message": "Content-Type 'application/json' is neither text/event-stream nor application/x-ndjson",
6
+ "eventIndex": -1,
7
+ "specUrl": "https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model"
8
+ }
9
+ ]
@@ -0,0 +1,25 @@
1
+ {
2
+ "contentType": "application/json",
3
+ "chunks": [
4
+ {
5
+ "gapMs": 0,
6
+ "text": "data: {\"type\":\"RUN_STARTED\",\"threadId\":\"thread_001\",\"runId\":\"run_001\",\"timestamp\":1755300020800}\n\n"
7
+ },
8
+ {
9
+ "gapMs": 0,
10
+ "text": "data: {\"type\":\"TEXT_MESSAGE_START\",\"messageId\":\"msg_001\",\"role\":\"assistant\",\"timestamp\":1755300020900}\n\n"
11
+ },
12
+ {
13
+ "gapMs": 0,
14
+ "text": "data: {\"type\":\"TEXT_MESSAGE_CONTENT\",\"messageId\":\"msg_001\",\"delta\":\"All good here.\",\"timestamp\":1755300021000}\n\n"
15
+ },
16
+ {
17
+ "gapMs": 0,
18
+ "text": "data: {\"type\":\"TEXT_MESSAGE_END\",\"messageId\":\"msg_001\",\"timestamp\":1755300021100}\n\n"
19
+ },
20
+ {
21
+ "gapMs": 0,
22
+ "text": "data: {\"type\":\"RUN_FINISHED\",\"threadId\":\"thread_001\",\"runId\":\"run_001\",\"outcome\":{\"type\":\"success\"},\"timestamp\":1755300021200}\n\n"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,9 @@
1
+ [
2
+ {
3
+ "rule": "AGUI506",
4
+ "severity": "info",
5
+ "message": "No event or keepalive frame for 47s",
6
+ "eventIndex": -1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/architecture#standard-http-client"
8
+ }
9
+ ]
@@ -0,0 +1,25 @@
1
+ {
2
+ "contentType": "text/event-stream",
3
+ "chunks": [
4
+ {
5
+ "gapMs": 0,
6
+ "text": "data: {\"type\":\"RUN_STARTED\",\"threadId\":\"thread_001\",\"runId\":\"run_001\",\"timestamp\":1755300021300}\n\n"
7
+ },
8
+ {
9
+ "gapMs": 0,
10
+ "text": "data: {\"type\":\"TEXT_MESSAGE_START\",\"messageId\":\"msg_001\",\"role\":\"assistant\",\"timestamp\":1755300021400}\n\n"
11
+ },
12
+ {
13
+ "gapMs": 0,
14
+ "text": "data: {\"type\":\"TEXT_MESSAGE_CONTENT\",\"messageId\":\"msg_001\",\"delta\":\"Thinking very hard…\",\"timestamp\":1755300021500}\n\n"
15
+ },
16
+ {
17
+ "gapMs": 0,
18
+ "text": "data: {\"type\":\"TEXT_MESSAGE_END\",\"messageId\":\"msg_001\",\"timestamp\":1755300021600}\n\n"
19
+ },
20
+ {
21
+ "gapMs": 47000,
22
+ "text": "data: {\"type\":\"RUN_FINISHED\",\"threadId\":\"thread_001\",\"runId\":\"run_001\",\"outcome\":{\"type\":\"success\"},\"timestamp\":1755300021700}\n\n"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,9 @@
1
+ [
2
+ {
3
+ "rule": "AGUI507",
4
+ "severity": "info",
5
+ "message": "Response appears buffered: entire body (5 events) arrived in a single chunk",
6
+ "eventIndex": -1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/architecture#standard-http-client"
8
+ }
9
+ ]
@@ -0,0 +1,9 @@
1
+ {
2
+ "contentType": "text/event-stream",
3
+ "chunks": [
4
+ {
5
+ "gapMs": 0,
6
+ "text": "data: {\"type\":\"RUN_STARTED\",\"threadId\":\"thread_001\",\"runId\":\"run_001\",\"timestamp\":1755300021800}\n\ndata: {\"type\":\"TEXT_MESSAGE_START\",\"messageId\":\"msg_001\",\"role\":\"assistant\",\"timestamp\":1755300021900}\n\ndata: {\"type\":\"TEXT_MESSAGE_CONTENT\",\"messageId\":\"msg_001\",\"delta\":\"All good here.\",\"timestamp\":1755300022000}\n\ndata: {\"type\":\"TEXT_MESSAGE_END\",\"messageId\":\"msg_001\",\"timestamp\":1755300022100}\n\ndata: {\"type\":\"RUN_FINISHED\",\"threadId\":\"thread_001\",\"runId\":\"run_001\",\"outcome\":{\"type\":\"success\"},\"timestamp\":1755300022200}\n\n"
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,17 @@
1
+ [
2
+ {
3
+ "rule": "AGUI508",
4
+ "severity": "error",
5
+ "message": "Connection ended mid-run 'run_001' without RUN_FINISHED or RUN_ERROR",
6
+ "eventIndex": -1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#runfinished"
8
+ },
9
+ {
10
+ "rule": "AGUI003",
11
+ "severity": "error",
12
+ "message": "Run 'run_001' ended without RUN_FINISHED or RUN_ERROR",
13
+ "eventIndex": -1,
14
+ "specUrl": "https://docs.ag-ui.com/concepts/events#runfinished",
15
+ "relatedEventIndex": 0
16
+ }
17
+ ]
@@ -0,0 +1,10 @@
1
+ {
2
+ "contentType": "text/event-stream",
3
+ "chunks": [
4
+ {
5
+ "gapMs": 0,
6
+ "text": "data: {\"type\":\"RUN_STARTED\",\"threadId\":\"thread_001\",\"runId\":\"run_001\",\"timestamp\":1755300022300}\n\n"
7
+ }
8
+ ],
9
+ "abnormalEof": true
10
+ }
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "rule": "AGUI901",
4
+ "severity": "info",
5
+ "message": "RAW event wraps an event of type 'TOOL_CALL_RESULT', which has a typed AG-UI equivalent",
6
+ "eventIndex": 1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#raw",
8
+ "eventType": "RAW",
9
+ "pointer": "/event/type"
10
+ }
11
+ ]
@@ -0,0 +1,3 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300019900}
2
+ {"type":"RAW","event":{"type":"TOOL_CALL_RESULT","toolCallId":"call_001","content":"wrapped"},"timestamp":1755300020000}
3
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300020100}
@@ -0,0 +1,9 @@
1
+ [
2
+ {
3
+ "rule": "AGUI902",
4
+ "severity": "info",
5
+ "message": "None of the 2 events carry the optional timestamp property",
6
+ "eventIndex": -1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#base-event-properties"
8
+ }
9
+ ]
@@ -0,0 +1,2 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001"}
2
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001"}
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "rule": "AGUI903",
4
+ "severity": "info",
5
+ "message": "CUSTOM event name 'update' has no namespace prefix (e.g. 'vendor.event')",
6
+ "eventIndex": 1,
7
+ "specUrl": "https://docs.ag-ui.com/concepts/events#custom",
8
+ "eventType": "CUSTOM",
9
+ "pointer": "/name"
10
+ }
11
+ ]
@@ -0,0 +1,3 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_001","runId":"run_001","timestamp":1755300020200}
2
+ {"type":"CUSTOM","name":"update","value":{"x":1},"timestamp":1755300020300}
3
+ {"type":"RUN_FINISHED","threadId":"thread_001","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300020400}
@@ -0,0 +1,14 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_chat","runId":"run_001","timestamp":1755300000100}
2
+ {"type":"REASONING_START","messageId":"rsn_001","timestamp":1755300000200}
3
+ {"type":"REASONING_MESSAGE_START","messageId":"rmsg_001","role":"reasoning","timestamp":1755300000300}
4
+ {"type":"REASONING_MESSAGE_CONTENT","messageId":"rmsg_001","delta":"The user greeted me; respond warmly.","timestamp":1755300000400}
5
+ {"type":"REASONING_MESSAGE_END","messageId":"rmsg_001","timestamp":1755300000500}
6
+ {"type":"REASONING_END","messageId":"rsn_001","timestamp":1755300000600}
7
+ {"type":"TEXT_MESSAGE_START","messageId":"msg_001","role":"assistant","timestamp":1755300000700}
8
+ {"type":"TEXT_MESSAGE_CONTENT","messageId":"msg_001","delta":"Hello! ","timestamp":1755300000800}
9
+ {"type":"TEXT_MESSAGE_CONTENT","messageId":"msg_001","delta":"How can I help ","timestamp":1755300000900}
10
+ {"type":"TEXT_MESSAGE_CONTENT","messageId":"msg_001","delta":"you today?","timestamp":1755300001000}
11
+ {"type":"TEXT_MESSAGE_END","messageId":"msg_001","timestamp":1755300001100}
12
+ {"type":"TEXT_MESSAGE_CHUNK","messageId":"msg_002","delta":"Chunked messages ","timestamp":1755300001200}
13
+ {"type":"TEXT_MESSAGE_CHUNK","delta":"work too.","timestamp":1755300001300}
14
+ {"type":"RUN_FINISHED","threadId":"thread_chat","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300001400}
@@ -0,0 +1,13 @@
1
+ {"type":"RUN_STARTED","threadId":"thread_genui","runId":"run_001","timestamp":1755300004200}
2
+ {"type":"STATE_SNAPSHOT","snapshot":{"steps":[{"name":"plan","status":"pending"},{"name":"execute","status":"pending"}]},"timestamp":1755300004300}
3
+ {"type":"STEP_STARTED","stepName":"plan","timestamp":1755300004400}
4
+ {"type":"STATE_DELTA","delta":[{"op":"replace","path":"/steps/0/status","value":"in_progress"}],"timestamp":1755300004500}
5
+ {"type":"STATE_DELTA","delta":[{"op":"replace","path":"/steps/0/status","value":"done"}],"timestamp":1755300004600}
6
+ {"type":"STEP_FINISHED","stepName":"plan","timestamp":1755300004700}
7
+ {"type":"STEP_STARTED","stepName":"execute","timestamp":1755300004800}
8
+ {"type":"STATE_DELTA","delta":[{"op":"replace","path":"/steps/1/status","value":"done"}],"timestamp":1755300004900}
9
+ {"type":"STEP_FINISHED","stepName":"execute","timestamp":1755300005000}
10
+ {"type":"TEXT_MESSAGE_START","messageId":"msg_001","role":"assistant","timestamp":1755300005100}
11
+ {"type":"TEXT_MESSAGE_CONTENT","messageId":"msg_001","delta":"All steps complete.","timestamp":1755300005200}
12
+ {"type":"TEXT_MESSAGE_END","messageId":"msg_001","timestamp":1755300005300}
13
+ {"type":"RUN_FINISHED","threadId":"thread_genui","runId":"run_001","outcome":{"type":"success"},"timestamp":1755300005400}