@ancleto/spec 0.4.6 → 0.5.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/cli/index.js +29 -0
package/package.json
CHANGED
package/src/cli/index.js
CHANGED
|
@@ -26,6 +26,7 @@ Uso:
|
|
|
26
26
|
ancleto install --tier <nivel> normal | minimo | gratis (pregunta en la 1ra config)
|
|
27
27
|
ancleto install --agent <nombre> opencode | vscode | antigravity | cursor | roo (pregunta si no esta guardado)
|
|
28
28
|
ancleto update [--project <dir>] Alias de install (re-instala sobre lo existente)
|
|
29
|
+
ancleto upgrade [--agent <nombre>] Re-aplica templates (LOCKED) y skills sobre el proyecto actual
|
|
29
30
|
ancleto init [--with-azure] [--agent <nombre>]
|
|
30
31
|
Crea .ancletorc en el repositorio actual
|
|
31
32
|
(Azure desactivado por defecto, agente: opencode)
|
|
@@ -417,6 +418,31 @@ async function install(args) {
|
|
|
417
418
|
if (azureMcp) console.log(AZURE_MCP_NOTICE)
|
|
418
419
|
}
|
|
419
420
|
|
|
421
|
+
async function upgradeCmd(args) {
|
|
422
|
+
const projectDir = process.cwd()
|
|
423
|
+
const rc = await readAncletorc(projectDir)
|
|
424
|
+
if (!rc) {
|
|
425
|
+
console.error("Error: No se encontro .ancletorc. Ejecuta 'ancleto init' primero.")
|
|
426
|
+
process.exit(1)
|
|
427
|
+
}
|
|
428
|
+
const agent = await resolveAgent(args, rc.agent)
|
|
429
|
+
await copyTemplates(projectDir)
|
|
430
|
+
const agentSkillsDir = await installAgentSkills(projectDir, agent)
|
|
431
|
+
const manifest = await writeManifest(projectDir, {
|
|
432
|
+
agent,
|
|
433
|
+
installedPaths: {
|
|
434
|
+
templates: ['AGENTS.md', 'PRODUCT.md'],
|
|
435
|
+
agents: ['.opencode/agents'],
|
|
436
|
+
commands: ['.opencode/commands'],
|
|
437
|
+
skills: [agentSkillsDir]
|
|
438
|
+
}
|
|
439
|
+
})
|
|
440
|
+
console.log(`ancleto: upgrade completo (v${manifest.version}, agente: ${agent})`)
|
|
441
|
+
console.log(' ✔ templates re-aplicados (bloques LOCKED actualizados, EXTENSIBLE intacto)')
|
|
442
|
+
console.log(` ✔ skills actualizadas en ${agentSkillsDir} (${OPENSPEC_SKILLS.length} skills)`)
|
|
443
|
+
console.log(' ✔ manifiesto .ancletorc actualizado')
|
|
444
|
+
}
|
|
445
|
+
|
|
420
446
|
async function initProject(args) {
|
|
421
447
|
const withAzure = args.includes('--with-azure')
|
|
422
448
|
const projectDir = process.cwd()
|
|
@@ -788,6 +814,9 @@ switch (cmd) {
|
|
|
788
814
|
case 'update':
|
|
789
815
|
await install(rest)
|
|
790
816
|
break
|
|
817
|
+
case 'upgrade':
|
|
818
|
+
await upgradeCmd(rest)
|
|
819
|
+
break
|
|
791
820
|
case 'init':
|
|
792
821
|
await initProject(rest)
|
|
793
822
|
break
|