Problem
.template-info stores the template URL and commit but not the project type. The patch system needs to know whether it's patching an MCP server, agent, or workflow project to select the right file categories, exclusion patterns, and cloning strategy.
Currently the only way to infer the type is by parsing pyproject.toml dependencies (e.g., looking for fastmcp), which is fragile and doesn't cover all project types.
Proposed change
Add a template.type field to the .template-info JSON written by write_template_info():
{
"template": {
"url": "https://github.com/fips-agents/agent-template",
"type": "agent",
"subdir": "templates/agent-loop",
"commit": "abc123def456",
"full_commit": "abc123def456789..."
}
}
Fields to add:
template.type: one of mcp-server, agent, workflow, gateway, ui, sandbox
template.subdir: the subdirectory within the repo (only for monorepo templates like agent/workflow; omit for standalone repos)
Update all write_template_info() call sites in commands/create.py to pass the type and subdir.
Backward compatibility
Existing projects won't have these fields. The patch code should treat a missing template.type as mcp-server (the only type that had patching before).
Part of
Tracking issue: #12
Problem
.template-infostores the template URL and commit but not the project type. The patch system needs to know whether it's patching an MCP server, agent, or workflow project to select the right file categories, exclusion patterns, and cloning strategy.Currently the only way to infer the type is by parsing
pyproject.tomldependencies (e.g., looking forfastmcp), which is fragile and doesn't cover all project types.Proposed change
Add a
template.typefield to the.template-infoJSON written bywrite_template_info():{ "template": { "url": "https://github.com/fips-agents/agent-template", "type": "agent", "subdir": "templates/agent-loop", "commit": "abc123def456", "full_commit": "abc123def456789..." } }Fields to add:
template.type: one ofmcp-server,agent,workflow,gateway,ui,sandboxtemplate.subdir: the subdirectory within the repo (only for monorepo templates like agent/workflow; omit for standalone repos)Update all
write_template_info()call sites incommands/create.pyto pass the type and subdir.Backward compatibility
Existing projects won't have these fields. The patch code should treat a missing
template.typeasmcp-server(the only type that had patching before).Part of
Tracking issue: #12