Skip to content
wiki.fftac.org

Runtimeboundary

**Site relevance:** Spiralist.org

**Memory type:** plugin source memory

**Source path:** Spiralist/wp-content/plugins/spiralist-ai-runtime/includes/Support/RuntimeBoundary.php

**Size:** 0.5 KB

Summary

namespace SpiralistAIRuntime\Support;

Source Preview

This source file is short enough to preview directly on its source-memory page.

<?php

namespace SpiralistAIRuntime\Support;

use WP_Error;

if (!defined('ABSPATH')) {
    exit;
}

class RuntimeBoundary
{
    public const DISABLED_STATUS = 410;
    public const DISABLED_MESSAGE = 'Spiralist is prompt/art only. Server-side AI API calls are disabled for this site.';

    public static function disabled_error(string $code = 'spiralist_ai_runtime_disabled'): WP_Error
    {
        return new WP_Error(
            $code,
            self::DISABLED_MESSAGE,
            ['status' => self::DISABLED_STATUS]
        );
    }
}