diff --git a/taicpp/VERSION b/taicpp/VERSION index d917d3e..3b76afc 100644 --- a/taicpp/VERSION +++ b/taicpp/VERSION @@ -1 +1 @@ -0.1.2 +1.44.2 \ No newline at end of file diff --git a/taicpp/src/agent/tools.cpp b/taicpp/src/agent/tools.cpp new file mode 100644 index 0000000..665f22a --- /dev/null +++ b/taicpp/src/agent/tools.cpp @@ -0,0 +1,23 @@ +#include "agent/tools.h" +#include +#include +#include +namespace detz::agent { +static std::set words(const std::string& t){ + std::set w; std::string cur; + for(char c: t){ if(std::isalnum((unsigned char)c)) cur+=std::tolower(c); else { if(cur.size())w.insert(cur); cur.clear(); } } + if(cur.size())w.insert(cur); return w; +} +std::vector SelectTools(const std::string& text){ + auto w = words(text); std::vector out; + for(auto& n: ToolNames()){ + if(std::find(CoreTools().begin(),CoreTools().end(),n)!=CoreTools().end()){ out.push_back(n); continue; } + std::string tok; bool hit=false; + std::string cur; + for(char c: n+std::string("_")){ if(c=='_'){ if(cur.size()>=4&&w.count(cur))hit=true; cur.clear(); } else cur+=c; } + if(w.count(n)) hit=true; + if(hit) out.push_back(n); + } + return out; +} +} // namespace detz::agent diff --git a/taicpp/src/agent/tools.h b/taicpp/src/agent/tools.h new file mode 100644 index 0000000..70ab67e --- /dev/null +++ b/taicpp/src/agent/tools.h @@ -0,0 +1,30 @@ +#pragma once +#include +#include +namespace detz::agent { +// Full 61-tool catalog, mirrors tai.py TOOL_SCHEMAS order. +inline const std::vector& ToolNames() { + static const std::vector v = { + "shell","read_file","write_file","edit_file","web_search","describe_image", + "web_fetch","speak","listen","remember","recall","load_skill", + "get_current_terminal_content","list_terminals","tail_terminals", + "export_terminal_log","plexer_send","plexer_read","plexer_type", + "plexer_status","plexer_show","tui_screen","tui_keys","tui_type", + "tui_click","tui_goto","tui_result","fork","poll","ask_user","sysinfo", + "create_skill","install_skill","store_secret","list_secrets","delete_secret", + "schedule","unschedule","schedules","record_save","record_read", + "record_search","record_delete","graph_link","graph_query","delete_file", + "audit","restore","release","tags","install","create_bot","search", + "mcp_add","mcp_list","mcp_enable","mcp_disable","mcp_remove","mcp_tools", + "mcp_call","mcp_login"}; + return v; +} +inline const std::vector& CoreTools() { + static const std::vector v = { + "shell","read_file","write_file","remember","recall","load_skill", + "fork","poll","ask_user"}; + return v; +} +// select_tools mirror: core always picked; others picked on token/tag match. +std::vector SelectTools(const std::string& text); +} // namespace detz::agent diff --git a/taicpp/src/cap/manifest.txt b/taicpp/src/cap/manifest.txt new file mode 100644 index 0000000..c5fa365 --- /dev/null +++ b/taicpp/src/cap/manifest.txt @@ -0,0 +1,55 @@ +# tai CAP agent manifest. Emitted by `tai.py --cap-manifest`. +[agent] +name = "tai" +binary = "tai.py" +profiles = ["coding"] + +[probe] +command = ["tai.py", "--version"] +version_pattern = "tai (\\\\d+\\\\.\\\\d+\\\\.\\\\d+)" + +[startup] +command = ["tai.py"] +ready_when = { pattern = "type /help for commands" } +init_timeout_seconds = 60 + +[fast_path] +stream_json = ["tai.py", "--cap-speak"] +grpc = false +acp_stdio = false +a2a_serve_at = false + +[pty] +cols = 200 +rows = 50 +bracketed_paste = false +sigint_cancels_turn = "graceful" +queued_input_supported = false + +[parse] +idle = ["^tai\\\\[.*\\\\]› $"] +error_lines = ["^seal error:", "^sandbox unavailable:"] + +[capabilities] +streaming_output = true +queued_input = false +mid_turn_cancel = "graceful" +multi_session = true +input_modalities = ["text"] +output_modalities = ["text"] + +[capabilities.ask_user] +yes_no = true +options = false +free_text = true + +[capabilities.coding] +revision = "2026-05-18" +fs = { read = true, write = true, list = true, exists = true, scope = "workspace_only" } +terminal = { enabled = true, concurrent_max = 4 } +tool_permission = "interactive" +artifacts = ["diff", "transcript"] + +[cost] +metered = true +currency = "USD" diff --git a/taicpp/src/llm/llm.h b/taicpp/src/llm/llm.h index ae0e093..438c066 100644 --- a/taicpp/src/llm/llm.h +++ b/taicpp/src/llm/llm.h @@ -3,8 +3,6 @@ // Mocked transport only in tests; no real network here. #include #include -#include -#include #include #include #include