Estado atual do TinyBlocks: editor estilo Scratch + graphics como interface

Snapshot do projeto antes de implementar o diálogo "Criar um Bloco":
- runtime C block-based (src/, include/)
- libraries: graphics (interface), sdl2 (backend), editor (estilo Scratch),
  python, mcp
- exemplos (hello, sdl2, editor, vector, json, customappearance, python, mcp)
- Makefile com alvo help e build do editor

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
mguinhosandClaude committed 2026-10-20 19:10:43 -03:00
commit 4950ad6006
49 files changed
+10596

No files matched your search

@@ -0,0 +1,36 @@
#ifndef TINYBLOCKS_MCP_H
#define TINYBLOCKS_MCP_H
#include <stdbool.h>
#ifdef _WIN32
# define TB_MCP_API __declspec(dllexport)
#else
# define TB_MCP_API __attribute__((visibility("default")))
#endif
/*
* tb_mcp — cliente MCP (Model Context Protocol) sobre transporte HTTP
* e stdio, implementado em Python via tinyblocks-python.
*
* Transport HTTP (streamable): url = "http://host:port/mcp"
* Transport stdio: url = "stdio://npx @modelcontextprotocol/server-filesystem /tmp"
*
* Todas as funções retornam string heap-alocada (caller frees) ou NULL em erro.
*/
TB_MCP_API bool tb_mcp_init(void);
TB_MCP_API void tb_mcp_deinit(void);
/* Lista ferramentas disponíveis → JSON array de objetos {name, description} */
TB_MCP_API char* tb_mcp_list_tools(const char* url);
/* Chama uma ferramenta com argumentos JSON → resultado JSON */
TB_MCP_API char* tb_mcp_call_tool(const char* url,
const char* tool_name,
const char* args_json);
/* Ping: verifica se o servidor responde → "ok" ou mensagem de erro */
TB_MCP_API char* tb_mcp_ping(const char* url);
#endif /* TINYBLOCKS_MCP_H */