Compare commits

..
Author SHA1 Message Date
hermes dbbac84b0d feat: pack wordpress con IA nativa de WP 7.1 — fuera Open WebUI
- Eliminado el servicio openwebui del pack wordpress (no estaba integrado
  con WP; el chat IA vive ahora dentro del editor de WordPress).
- Plugins IA oficiales preinstalados y configurados en el arranque:
  'AI' (AI Experiments) + 'AI Provider for Ollama' (connector), host
  http://ollama:11434 (red interna del compose, sin puerto publicado).
- Autoconfig via contenedor oficial wordpress:cli (--volumes-from):
  espera a core is-installed, instala plugins y setea el option. Si WP
  aun no esta instalado, aviso y re-ejecucion tras el asistente.
- CPU cap dinamico en hermes/openclaw (min 6, nproc) y OLLAMA_CPUS
  parametrizado en compose (6.0 default) — evita fallo en hosts de 4 cores.
- .gitignore raiz (**/.env, *.gguf, override GPU).
- GATE A PASS: subagente independiente (5 findings aplicados: EAP 5.1,
  .gitignore, fallo autoconfig visible, red vacia, indentacion).
- E2E verificado en VPS: plugins activos + option host + provider
  responde /v1/chat/completions del modelo local.
2026-09-12 23:48:19 +02:00
4 changed files with 0 additions and 85 deletions

No files matched your search

-14
View File
@@ -303,20 +303,6 @@ if ($WpReady) {
} else {
Warn 'No se pudo auto-configurar. Re-ejecuta .\deploy.ps1 tras el asistente de WordPress.'
}
# Estilo editorial: copiar al wp-content (editable: editorial-style.php del pack)
# e instalar el mu-plugin que lo inyecta en las instrucciones de la IA.
$StyleRc = 1
cmd /c "docker exec d0a1-wp mkdir -p /var/www/html/wp-content/mu-plugins >NUL 2>&1"
if ($LASTEXITCODE -eq 0) {
docker cp (Join-Path $ScriptDir 'editorial-style.php') d0a1-wp:/var/www/html/wp-content/editorial-style.php 2>$null
if ($LASTEXITCODE -eq 0) {
docker cp (Join-Path $ScriptDir 'mu-plugin-d0a1-editorial.php') d0a1-wp:/var/www/html/wp-content/mu-plugins/d0a1-editorial.php 2>$null
$StyleRc = $LASTEXITCODE
}
}
if ($StyleRc -eq 0) {
Ok 'Estilo editorial activo (edita editorial-style.php y re-ejecuta para cambiarlo)'
}
} else {
Warn 'WordPress aun no esta instalado. Tras el asistente del navegador,'
Warn 'vuelve a ejecutar .\deploy.ps1 y los plugins de IA se configuran solos.'
-8
View File
@@ -171,14 +171,6 @@ if [ "$WP_READY" = "1" ]; then
'{"host":"http://ollama:11434"}' --format=json >/dev/null 2>&1 \
&& echo -e "${GREEN}✓${NC} Plugins de IA activados y conectados a Ollama (IA local)" \
|| echo -e "${YELLOW}⚠ No se pudo auto-configurar. Re-ejecuta ./deploy.sh tras el asistente de WordPress.${NC}"
# Estilo editorial: copiar al wp-content (editable: editorial-style.php del pack)
# e instalar el mu-plugin que lo inyecta en las instrucciones de la IA.
if docker cp "$SCRIPT_DIR/editorial-style.php" d0a1-wp:/var/www/html/wp-content/editorial-style.php >/dev/null 2>&1 \
&& docker exec d0a1-wp mkdir -p /var/www/html/wp-content/mu-plugins \
&& docker cp "$SCRIPT_DIR/mu-plugin-d0a1-editorial.php" \
d0a1-wp:/var/www/html/wp-content/mu-plugins/d0a1-editorial.php >/dev/null 2>&1; then
echo -e "${GREEN}✓${NC} Estilo editorial activo (edita editorial-style.php y re-ejecuta para cambiarlo)"
fi
else
echo -e "${YELLOW}⚠ WordPress aun no está instalado. Tras el asistente del navegador,"
echo -e " vuelve a ejecutar ./deploy.sh y los plugins de IA se configuran solos.${NC}"
-20
View File
@@ -1,20 +0,0 @@
<?php
/**
* Estilo editorial de d0a1 para la IA local (WordPress "AI" plugin).
* EDITA AQUI y re-ejecuta deploy para aplicarlo. La IA redacta segun esto.
*/
return array(
'estilo' => 'Directo, claro y cercano. Sin humo. Espanol de Espana (tu, no usted). Frases cortas.',
'reglas' => array(
'Spanish (Spain) siempre, salvo que el contenido fuente este en otro idioma.',
'Nada de relleno: cada frase aporta un dato, un beneficio o un paso.',
'Precios en euros (EUR).',
'Voz activa. Verbo al principio cuando sea natural.',
),
'prohibido' => array(
'Emojis, hashtags ni llamadas a la accion genericas.',
'Superlativos vacios ("increible", "revolucionario").',
'Markdown ni comillas envolviendo el resultado.',
),
'titulares_max_chars' => 60,
);
-43
View File
@@ -1,43 +0,0 @@
<?php
/**
* Plugin Name: d0a1 — Instrucciones editoriales IA (mu-plugin)
* Description: Inyecta el estilo editorial (editorial-style.php del pack) en las instrucciones de sistema del plugin "AI".
*/
if ( ! defined( 'ABSPATH' ) ) { exit; }
function d0a1_editorial_style() {
$file = WP_CONTENT_DIR . '/editorial-style.php';
if ( ! file_exists( $file ) ) { return null; }
$s = include $file;
return is_array( $s ) ? $s : null;
}
function d0a1_editorial_block() {
$s = d0a1_editorial_style();
if ( ! $s ) { return ''; }
$out = "\n\nESTILO EDITORIAL DEL SITIO (prioridad sobre instrucciones anteriores):\n";
if ( ! empty( $s['estilo'] ) ) { $out .= 'Tono: ' . $s['estilo'] . "\n"; }
if ( ! empty( $s['reglas'] ) ) {
$out .= "Normas:\n";
foreach ( $s['reglas'] as $r ) { $out .= '- ' . $r . "\n"; }
}
if ( ! empty( $s['prohibido'] ) ) {
$out .= "Prohibido:\n";
foreach ( $s['prohibido'] as $p ) { $out .= '- ' . $p . "\n"; }
}
return $out;
}
// Global: todas las funciones IA del plugin (titulos, extractos, alt text, moderacion...).
add_filter( 'wpai_system_instruction', function ( $instruction ) {
return $instruction . d0a1_editorial_block();
}, 10, 1 );
// Afinar titulares: max chars configurable en editorial-style.php.
add_filter( 'wpai_title_generation_system_instruction', function ( $instruction ) {
$s = d0a1_editorial_style();
if ( $s && ! empty( $s['titulares_max_chars'] ) && $s['titulares_max_chars'] !== 80 ) {
$instruction = preg_replace( '/Be no more than \d+ characters/', 'Be no more than ' . (int) $s['titulares_max_chars'] . ' characters', $instruction );
}
return $instruction;
}, 10, 1 );