openprompt-lang 1.2.4 → 1.2.6
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
CHANGED
|
@@ -135,11 +135,11 @@ export async function initExisting(options = {}) {
|
|
|
135
135
|
? JSON.parse(readFileSync(join(cwd, "package.json"), "utf-8")).name || "mi-proyecto"
|
|
136
136
|
: "mi-proyecto"
|
|
137
137
|
|
|
138
|
+
const interactive = options.interactive !== false && !!process.stdin.isTTY
|
|
138
139
|
if (!rebuild) {
|
|
139
140
|
console.log(chalk.cyan(`\n🔧 Inicializando OPL en proyecto existente: ${projectName}\n`))
|
|
140
141
|
|
|
141
142
|
// ── Verificar OpenCode ──
|
|
142
|
-
const interactive = options.interactive !== false && !!process.stdin.isTTY
|
|
143
143
|
await checkAndInstallOpencode(interactive)
|
|
144
144
|
|
|
145
145
|
console.log(chalk.cyan("✨ OPL Init: Entorno detectado."))
|
|
@@ -426,6 +426,26 @@ Tu proceso obligatorio es:
|
|
|
426
426
|
console.log(chalk.yellow(" ⚠️ No se pudo ejecutar upgrade automáticamente."))
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
+
if (interactive) {
|
|
430
|
+
const { updateKnowledge } = await inquirer.prompt([
|
|
431
|
+
{
|
|
432
|
+
type: "confirm",
|
|
433
|
+
name: "updateKnowledge",
|
|
434
|
+
message: "¿Deseas descargar/actualizar la biblioteca de conocimientos (Entorno Académico)?",
|
|
435
|
+
default: false,
|
|
436
|
+
},
|
|
437
|
+
])
|
|
438
|
+
|
|
439
|
+
if (updateKnowledge) {
|
|
440
|
+
try {
|
|
441
|
+
const { initKnowledgeRepo } = await import("./opl-init-knowledge.js")
|
|
442
|
+
await initKnowledgeRepo(options)
|
|
443
|
+
} catch {
|
|
444
|
+
console.log(chalk.yellow(" ⚠️ No se pudo actualizar el conocimiento automáticamente."))
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
429
449
|
console.log(chalk.cyan(`\n✅ Integración OLP reconstruida para: ${projectName}`))
|
|
430
450
|
console.log(chalk.cyan(` Versión OPL: ${config.oplVersion || "desconocida"}`))
|
|
431
451
|
console.log(chalk.gray(" Archivos generados forzaron actualización."))
|
|
@@ -288,7 +288,7 @@ export function setupOpencodeConfig(baseDir, _config) {
|
|
|
288
288
|
const opencodeConfig = {
|
|
289
289
|
$schema: "https://opencode.ai/config.json",
|
|
290
290
|
mcp: {
|
|
291
|
-
openPrompt: { type: "local", command: ["
|
|
291
|
+
openPrompt: { type: "local", command: ["openprompt-lang", "mcp"], enabled: true },
|
|
292
292
|
},
|
|
293
293
|
skills: { paths: [".opencode/skills"] },
|
|
294
294
|
default_agent: "openPrompt",
|
|
@@ -224,7 +224,7 @@ async function setupOpencode(cwd, config, langId, index) {
|
|
|
224
224
|
mcp: {
|
|
225
225
|
openPrompt: {
|
|
226
226
|
type: "local",
|
|
227
|
-
command: ["
|
|
227
|
+
command: ["openprompt-lang", "mcp"],
|
|
228
228
|
enabled: true,
|
|
229
229
|
},
|
|
230
230
|
},
|
|
@@ -349,8 +349,8 @@ async function setupVscode(cwd, config, langId) {
|
|
|
349
349
|
servers: {
|
|
350
350
|
"openPrompt-Lang": {
|
|
351
351
|
type: "stdio",
|
|
352
|
-
command: "
|
|
353
|
-
args: ["
|
|
352
|
+
command: "openprompt-lang",
|
|
353
|
+
args: ["mcp"],
|
|
354
354
|
},
|
|
355
355
|
},
|
|
356
356
|
}
|
|
@@ -381,8 +381,8 @@ async function setupAntigravity(cwd, config, langId) {
|
|
|
381
381
|
const globalMcp = {
|
|
382
382
|
mcpServers: {
|
|
383
383
|
"openPrompt-Lang": {
|
|
384
|
-
command: "
|
|
385
|
-
args: ["
|
|
384
|
+
command: "openprompt-lang",
|
|
385
|
+
args: ["mcp"],
|
|
386
386
|
},
|
|
387
387
|
},
|
|
388
388
|
}
|