feat: initialize tfcode project structure

- Add README.md as living documentation
- Add tfcode.json schema and config template
- Add FORK_MANAGEMENT.md with mirror-based fork strategy
- Add scripts/rebrand.sh for reapplying branding after upstream merges
- Add packages/tf-sync Python module using official ToothFairyAI SDK
- Add packages/tf-mcp-bridge TypeScript module (stub)
- Multi-region support (AU, EU, US)
- Tool sync: MCP servers, Agent Skills, Database Scripts, API Functions
This commit is contained in:
Gab
2026-03-24 13:02:06 +11:00
parent 7bb69038ec
commit abdfa7330e
14 changed files with 1627 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
"""
MCP server sync module for tfcode.
Uses the official ToothFairyAI Python SDK.
"""
from pydantic import BaseModel
from tf_sync.config import TFConfig
from tf_sync.tools import SyncedTool, sync_tools, ToolType
class MCPServerSyncResult(BaseModel):
"""Result of MCP server sync operation."""
success: bool
servers: list[SyncedTool] = []
error: str | None = None
def sync_mcp_servers(config: TFConfig) -> MCPServerSyncResult:
"""
Sync MCP servers from ToothFairyAI workspace.
MCP servers are tools with isMCPServer=true.
Credentials stay in TF and are accessed via tf_proxy.
Args:
config: TFConfig instance
Returns:
MCPServerSyncResult with synced MCP servers
"""
result = sync_tools_by_type(config, [ToolType.MCP_SERVER])
if not result.success:
return MCPServerSyncResult(
success=False,
error=result.error,
)
# Get MCP servers from tools with isMCPServer
mcp_servers = [
t for t in result.tools
if t.is_mcp_server
]
return MCPServerSyncResult(
success=True,
servers=mcp_servers,
)
# Import from tools module
from tf_sync.tools import sync_tools_by_type