Runtimeboundary
**Site relevance:** Spiralist.org
**Memory type:** plugin source memory
**Source path:** Spiralist/wp-content/plugins/spiralist-workspace/includes/Support/RuntimeBoundary.php
**Size:** 0.7 KB
Summary
namespace SpiralistWorkspace\Support;
Source Preview
This source file is short enough to preview directly on its source-memory page.
<?php
namespace SpiralistWorkspace\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_workspace_provider_disabled'): WP_Error
{
if (function_exists('spiralist_ai_runtime_disabled_error')) {
return spiralist_ai_runtime_disabled_error($code);
}
return new WP_Error(
$code,
self::DISABLED_MESSAGE,
['status' => self::DISABLED_STATUS]
);
}
}