trackfw 2.13.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/integrations/render.js +61 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trackfw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "Governance CLI for AI-native software delivery and AI coding agents. Enforces traceability: ADR → REQ → ROADMAP → kanban. Native support for Codex, Claude Code, Gemini CLI, Cursor, Copilot, Windsurf, and Amazon Q.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
// Mapa de model: nomes canônicos do catálogo → tier aceito pelo Antigravity CLI (agy)
|
|
4
|
+
const MODEL_MAP = { opus: 'pro', sonnet: 'flash' }
|
|
5
|
+
// Valores que já são tiers válidos do agy e devem passar sem transformação
|
|
6
|
+
const MODEL_PASSTHROUGH = new Set(['flash_lite', 'flash', 'pro'])
|
|
7
|
+
|
|
8
|
+
// SET_IMPL — conjunto base de 10 ferramentas para agentes de implementação
|
|
9
|
+
const SET_IMPL = [
|
|
10
|
+
'view_file',
|
|
11
|
+
'list_dir',
|
|
12
|
+
'grep_search',
|
|
13
|
+
'search_web',
|
|
14
|
+
'read_url_content',
|
|
15
|
+
'write_to_file',
|
|
16
|
+
'replace_file_content',
|
|
17
|
+
'run_command',
|
|
18
|
+
'command_status',
|
|
19
|
+
'generate_image',
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
// SET_ARCH — SET_IMPL + 4 ferramentas de orquestração (total 14) para agentes arquitetos
|
|
23
|
+
const SET_ARCH = [
|
|
24
|
+
...SET_IMPL,
|
|
25
|
+
'send_message',
|
|
26
|
+
'define_subagent',
|
|
27
|
+
'invoke_subagent',
|
|
28
|
+
'schedule',
|
|
29
|
+
]
|
|
30
|
+
|
|
3
31
|
function normalize(content) {
|
|
4
32
|
return `${content.trim()}\n`
|
|
5
33
|
}
|
|
@@ -8,6 +36,7 @@ function markdownParts(content) {
|
|
|
8
36
|
const text = content.trim()
|
|
9
37
|
let name = 'trackfw-agent'
|
|
10
38
|
let description = 'trackfw specialist'
|
|
39
|
+
let model = ''
|
|
11
40
|
let body = text
|
|
12
41
|
if (text.startsWith('---\n')) {
|
|
13
42
|
const end = text.indexOf('\n---', 4)
|
|
@@ -21,10 +50,26 @@ function markdownParts(content) {
|
|
|
21
50
|
const value = line.slice(separator + 1).trim().replace(/^['"]|['"]$/g, '')
|
|
22
51
|
if (key === 'name') name = value
|
|
23
52
|
if (key === 'description') description = value
|
|
53
|
+
if (key === 'model') model = value
|
|
24
54
|
}
|
|
25
55
|
}
|
|
26
56
|
}
|
|
27
|
-
return { name, description, body }
|
|
57
|
+
return { name, description, model, body }
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// resolveModel converte o modelo canônico para o tier aceito pelo agy.
|
|
61
|
+
// Retorna o valor mapeado, ou string vazia se a linha model deve ser omitida.
|
|
62
|
+
function resolveModel(model) {
|
|
63
|
+
if (!model) return ''
|
|
64
|
+
if (MODEL_PASSTHROUGH.has(model)) return model
|
|
65
|
+
return MODEL_MAP[model] || ''
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// toolsFor retorna SET_ARCH para agentes cujo nome termina em "architect", SET_IMPL para os demais.
|
|
69
|
+
// IDs proibidos (edit_file, read_file, find, view_code_item, view_file_outline, call_mcp_tool)
|
|
70
|
+
// nunca fazem parte de nenhum dos conjuntos.
|
|
71
|
+
function toolsFor(name) {
|
|
72
|
+
return name.endsWith('architect') ? SET_ARCH : SET_IMPL
|
|
28
73
|
}
|
|
29
74
|
|
|
30
75
|
function render({ kind, content, capability }) {
|
|
@@ -36,6 +81,21 @@ function render({ kind, content, capability }) {
|
|
|
36
81
|
if (capability.representation === 'cli-agent-json' || capability.representation === 'agent-json') {
|
|
37
82
|
return `${JSON.stringify({ name: parts.name, description: parts.description, prompt: parts.body }, null, 2)}\n`
|
|
38
83
|
}
|
|
84
|
+
if (capability.representation === 'agent-directory') {
|
|
85
|
+
// Reconstrói o frontmatter para o Antigravity CLI (agy):
|
|
86
|
+
// - mapeia model canônico para o tier aceito (opus→pro, sonnet→flash)
|
|
87
|
+
// - injeta tools: SET_IMPL ou SET_ARCH dependendo do nome do agente
|
|
88
|
+
// - omite campos não suportados pelo agy
|
|
89
|
+
const mappedModel = resolveModel(parts.model)
|
|
90
|
+
const tools = toolsFor(parts.name)
|
|
91
|
+
let out = `---\nname: ${parts.name}\ndescription: ${parts.description}\n`
|
|
92
|
+
if (mappedModel) out += `model: ${mappedModel}\n`
|
|
93
|
+
out += 'tools:\n'
|
|
94
|
+
for (const tool of tools) out += ` - ${tool}\n`
|
|
95
|
+
out += '---\n'
|
|
96
|
+
if (parts.body) out += `${parts.body}\n`
|
|
97
|
+
return out
|
|
98
|
+
}
|
|
39
99
|
return normalize(content)
|
|
40
100
|
}
|
|
41
101
|
|