diff --git a/static/2024-05-30-graph-json/graph.json b/static/2024-05-30-graph-json/graph.json new file mode 100644 index 000000000..1f6400b46 --- /dev/null +++ b/static/2024-05-30-graph-json/graph.json @@ -0,0 +1,90 @@ +{ + "nodes": [ + { + "id": "a", + "messages": [ + { + "role": "user", + "content": "get my todos" + }, + { + "role": "assistent", + "content": "..." + } + ], + "definition": { + "name": "todos", + "contentType": "text/javascript", + "signature": { + "inputs": {}, + "output": { + "$id": "https://common.tools/stream.schema.json", + "type": { + "$id": "https://common.tools/todos.json" + } + } + }, + "body": "return system.get('todos')" + } + }, + { + "id": "b", + "messages": [ + { + "role": "user", + "content": "render todo" + }, + { + "role": "assistent", + "content": "..." + } + ], + "definition": { + "name": "ui", + "contentType": "application/json+vnd.common.ui", + "signature": { + "inputs": { + "todos": { + "$id": "https://common.tools/stream.schema.json", + "type": { + "$id": "https://common.tools/todos.json" + } + } + }, + "output": { + "$id": "https://common.tools/ui.schema.json" + } + }, + "body": { + "tag": "todos", + "props": { + "className": "todo" + }, + "children": { + "type": "repeat", + "binding": "todos", + "template": [ + { + "tag": "todo", + "props": { + "todo": { + "$id": "https://common.tools/cell.json", + "type": "todo" + } + }, + "children": [] + } + ] + } + } + } + } + ], + "edges": [ + {"todos": ["ui", "todos"]} + ], + "order": [ + "a", + "b" + ] +} \ No newline at end of file