Live CortexUI Surface

This block renders live CortexUI contract metadata in the docs DOM so AI View can inspect real machine-readable elements instead of only code examples.

AI View can now inspect a live status region, form fields, actions, and table entities on every docs page.
AI-addressable docs entities
ItemState
Search docsReady
Inspect metadataVisible in AI View

Event Logs

Using getRecentEvents() for Debugging

// After doing something in the UI:
const events = window.__CORTEX_UI__.getRecentEvents();
console.table(events);

Filtering Events

const events = window.__CORTEX_UI__.getRecentEvents();

// Just failures
const failures = events.filter(e => e.type === 'action_failed');

// Events for a specific action
const saveEvents = events.filter(e => e.actionId === 'save-profile');

Diagnosing Agent Failures

If an AI agent reports an action failed, check:

const recentFailures = window.__CORTEX_UI__.getRecentEvents()
  .filter(e => e.type === 'action_failed');

recentFailures.forEach(e => {
  console.log(`Action ${e.actionId} failed: ${e.message}`);
});
Note

The event log is capped at the 100 most recent events. For longer sessions, events are evicted FIFO.