@ancleto/spec 0.6.29 → 0.6.30
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/README.md +2 -0
- package/package.json +1 -1
- package/src/cli/index.js +14 -6
package/README.md
CHANGED
|
@@ -229,6 +229,8 @@ ancleto install [--project <dir>] [--tier <nivel>] [--agent <nombre>] [--no-mcp]
|
|
|
229
229
|
# Instala agentes, skills y templates
|
|
230
230
|
|
|
231
231
|
ancleto update # Re-instala la última versión sobre lo existente
|
|
232
|
+
# Parado en un proyecto con .ancletorc opera sobre ESE proyecto;
|
|
233
|
+
# usá --global para forzar el alcance global
|
|
232
234
|
|
|
233
235
|
ancleto upgrade # Re-aplica templates y skills respetando tus personalizaciones
|
|
234
236
|
|
package/package.json
CHANGED
package/src/cli/index.js
CHANGED
|
@@ -34,6 +34,8 @@ Uso:
|
|
|
34
34
|
ancleto install --tier <nivel> normal | minimo | gratis (wizard interactivo en TTY)
|
|
35
35
|
ancleto install --agent <nombre> opencode | vscode | antigravity | cursor | roo (wizard si no esta guardado)
|
|
36
36
|
ancleto update [--project <dir>] Alias de install (re-instala sobre lo existente)
|
|
37
|
+
Parado en un proyecto con .ancletorc opera sobre ese proyecto;
|
|
38
|
+
usa --global para forzar el alcance global
|
|
37
39
|
ancleto upgrade [--agent <nombre>] Re-aplica templates (LOCKED) y skills sobre el proyecto actual
|
|
38
40
|
ancleto init [--with-azure] [--agent <nombre>] [--tier <nivel>]
|
|
39
41
|
Crea .ancletorc en el repositorio actual
|
|
@@ -716,22 +718,28 @@ async function copyTemplates(projectDir) {
|
|
|
716
718
|
|
|
717
719
|
async function install(args) {
|
|
718
720
|
const pi = args.indexOf('--project')
|
|
719
|
-
const
|
|
721
|
+
const explicitProject = pi >= 0 ? args[pi + 1] : null
|
|
720
722
|
const withMcp = !args.includes('--no-mcp')
|
|
721
723
|
let mcpMap = withMcp ? buildDefaultMcp({ withEngram: args.includes('--with-engram') }) : {}
|
|
722
724
|
|
|
723
725
|
const agentFlag = scanAgentFlag(args)
|
|
724
726
|
let tier = scanTierFlag(args)
|
|
725
727
|
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
728
|
+
let projectDir
|
|
729
|
+
if (explicitProject) {
|
|
730
|
+
projectDir = resolve(explicitProject)
|
|
731
|
+
if (!(await exists(projectDir))) {
|
|
732
|
+
console.error(`ancleto: el directorio no existe: ${projectDir}`)
|
|
730
733
|
process.exit(1)
|
|
731
734
|
}
|
|
735
|
+
} else if (!args.includes('--global') && (await exists(join(process.cwd(), '.ancletorc')))) {
|
|
736
|
+
// Estar parado en un proyecto ancleto implica operar sobre ese proyecto.
|
|
737
|
+
// `--global` fuerza el alcance global cuando el repo tambien tiene .ancletorc.
|
|
738
|
+
projectDir = process.cwd()
|
|
739
|
+
} else {
|
|
740
|
+
projectDir = null
|
|
732
741
|
}
|
|
733
742
|
|
|
734
|
-
const projectDir = project ? resolve(project) : null
|
|
735
743
|
const target = projectDir ? join(projectDir, '.opencode') : globalConfigDir()
|
|
736
744
|
const existingRc = projectDir ? await readAncletorc(projectDir) : null
|
|
737
745
|
const storedTier = (await exists(tierStatePath(target)))
|