diff --git a/packages/tf-sync/src/tf_sync/__pycache__/config.cpython-313.pyc b/packages/tf-sync/src/tf_sync/__pycache__/config.cpython-313.pyc index e1a47a6da..5b8500a98 100644 Binary files a/packages/tf-sync/src/tf_sync/__pycache__/config.cpython-313.pyc and b/packages/tf-sync/src/tf_sync/__pycache__/config.cpython-313.pyc differ diff --git a/packages/tf-sync/src/tf_sync/__pycache__/tools.cpython-313.pyc b/packages/tf-sync/src/tf_sync/__pycache__/tools.cpython-313.pyc index 30103b589..18f873215 100644 Binary files a/packages/tf-sync/src/tf_sync/__pycache__/tools.cpython-313.pyc and b/packages/tf-sync/src/tf_sync/__pycache__/tools.cpython-313.pyc differ diff --git a/packages/tf-sync/src/tf_sync/config.py b/packages/tf-sync/src/tf_sync/config.py index 9cb7bd3ef..4b3214663 100644 --- a/packages/tf-sync/src/tf_sync/config.py +++ b/packages/tf-sync/src/tf_sync/config.py @@ -22,6 +22,7 @@ class Region(str, Enum): class ToolType(str, Enum): MCP_SERVER = "mcp_server" AGENT_SKILL = "agent_skill" + CODER_AGENT = "coder_agent" DATABASE_SCRIPT = "database_script" API_FUNCTION = "api_function" diff --git a/packages/tf-sync/src/tf_sync/tools.py b/packages/tf-sync/src/tf_sync/tools.py index 53f96bdc5..e2584ed45 100644 --- a/packages/tf-sync/src/tf_sync/tools.py +++ b/packages/tf-sync/src/tf_sync/tools.py @@ -115,6 +115,8 @@ def parse_agent(agent) -> SyncedTool: """ Parse Agent from SDK into SyncedTool. + Coder agents (mode='coder') are CODER_AGENT type, not skills. + Args: agent: Agent from TF SDK @@ -125,8 +127,8 @@ def parse_agent(agent) -> SyncedTool: id=agent.id, name=agent.label or f"agent_{agent.id[:8]}", description=agent.description, - tool_type=ToolType.AGENT_SKILL, - is_agent_skill=True, + tool_type=ToolType.CODER_AGENT, + is_agent_skill=False, auth_via="tf_agent", ) diff --git a/packages/tfcode/src/agent/agent.ts b/packages/tfcode/src/agent/agent.ts index d434595f7..8e7c3c303 100644 --- a/packages/tfcode/src/agent/agent.ts +++ b/packages/tfcode/src/agent/agent.ts @@ -263,7 +263,7 @@ export namespace Agent { if (!data.success || !data.tools) return [] return data.tools - .filter((t: any) => t.tool_type === "agent_skill") + .filter((t: any) => t.tool_type === "coder_agent") .map((t: any): Info => ({ name: t.name, description: t.description, diff --git a/packages/tfcode/src/skill/index.ts b/packages/tfcode/src/skill/index.ts index 43a22219e..34b9d555c 100644 --- a/packages/tfcode/src/skill/index.ts +++ b/packages/tfcode/src/skill/index.ts @@ -201,7 +201,31 @@ export namespace Skill { const all = Effect.fn("Skill.all")(function* () { const cache = yield* ensure() - return Object.values(cache.skills) + const skills = Object.values(cache.skills) + + // Add TF agent skills from synced tools (only agent_skill type, not coder_agent) + const toolsPath = path.join(Global.Path.data, ".tfcode", "tools.json") + try { + const content = yield* Effect.promise(() => Bun.file(toolsPath).text()) + const data = JSON.parse(content) as { success: boolean; tools: Array<{ tool_type: string; name: string; description?: string; id: string }> } + if (data.success && data.tools) { + for (const tool of data.tools) { + // Only include agent_skill (from is_agent_skill=True), not coder_agent + if (tool.tool_type === "agent_skill") { + skills.push({ + name: tool.name, + description: tool.description || "ToothFairyAI Agent Skill", + location: `tf://${tool.id}`, + content: "", + }) + } + } + } + } catch { + // Ignore errors loading TF tools + } + + return skills }) const dirs = Effect.fn("Skill.dirs")(function* () {