feat(autonomy): wire Cognitive Opus 4.6 (118 fns) + opus-master-system prompt 10KB - bootstrap wrapper + 1 line require_once - GOLD before, 0 collision, syntax OK, all fns loaded - cause racine manque autonomie WEVIA
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled

This commit is contained in:
opus
2026-04-21 03:07:01 +02:00
parent 838d8cc12b
commit 5d809e66a1
2 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<?php
// ╔═══════════════════════════════════════════════════════════════════════════╗
// ║ WEVIA COGNITIVE OPUS 4.6 BOOTSTRAP — wires 118 advanced fns ║
// ║ Created 2026-04-21 — Opus session ║
// ║ Effect: makes self-correction, tool planning, ethical reasoning, etc. ║
// ║ available to wevia-master-api.php ║
// ║ ║
// ║ ROLLBACK: just delete this file — master-api uses @require_once ║
// ║ so absence is silently ignored, zero regression. ║
// ╚═══════════════════════════════════════════════════════════════════════════╝
// Guard: idempotent (safe to include multiple times)
if (defined('WEVIA_COGNITIVE_OPUS46_BOOTSTRAPPED')) return;
define('WEVIA_COGNITIVE_OPUS46_BOOTSTRAPPED', 1);
// Wire core cognitive modules (silent if missing)
@require_once '/opt/wevia-brain/cognitive-opus46-advanced.php';
@require_once '/opt/wevia-brain/cognitive-opus46.php';
// Optional advanced modules (auto-load if present)
@require_once '/opt/wevia-brain/modules/chain-of-thought.php';
@require_once '/opt/wevia-brain/modules/opus-orchestrator.php';
@require_once '/opt/wevia-brain/modules/rag-engine.php';
@require_once '/opt/wevia-brain/modules/tool-use-engine.php';
// Load Opus master system prompt (10KB master directives)
$GLOBALS['OPUS46_SYSTEM_PROMPT'] = @file_get_contents('/opt/wevia-brain/prompts/opus-master-system.md') ?: '';
// Load master directives
$_dir_json = @file_get_contents('/opt/wevia-brain/master-directives.json');
$GLOBALS['OPUS46_MASTER_DIRECTIVES'] = $_dir_json ? @json_decode($_dir_json, true) : [];
// Status flags accessible by other modules
$GLOBALS['OPUS46_LOADED'] = function_exists('selfCorrectionShouldActivate');
$GLOBALS['OPUS46_FNS_AVAILABLE'] = [
'self_correction' => function_exists('selfCorrectionPipeline'),
'tool_planning' => function_exists('selectBestGPUModel'),
'ollama_inventory' => function_exists('getOllamaModelInventory'),
'detect_hallucination' => function_exists('detectHallucinatedNumbers'),
'detect_contradiction' => function_exists('detectLogicalContradiction'),
'detect_truncation' => function_exists('detectTruncatedResponse'),
];

View File

@@ -431,6 +431,11 @@ if (!empty($_mam)) {
// V26-SURGICAL normalizer prehook (Opus 17avr 17h50) — fix "combien j'ai de leads" → route correct
@require_once __DIR__ . "/wevia-nl-normalizer-prehook.php";
// ═══ COGNITIVE OPUS 4.6 BOOTSTRAP (added 2026-04-21) ═══
// Wires 118 advanced cognitive functions: self-correction, tool planning,
// ethical reasoning, hallucination detection, etc. Silent fail if missing.
@require_once __DIR__ . "/wevia-cognitive-opus46-bootstrap.php";
// === OPUS_BUSINESS_COUNT_GUARD_17AVR (natural language → SQL real) ===
if (!empty($_mam)) {
$__bm = $_mam;