refactor: rename namespace Core\Agentic to Core\Mod\Agentic
Updates all classes to use the new modular namespace convention. Adds Service/ layer with Core\Service\Agentic for service definition. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
1350472d11
commit
ad83825f93
101 changed files with 3289 additions and 276 deletions
4
Boot.php
4
Boot.php
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic;
|
||||
namespace Core\Mod\Agentic;
|
||||
|
||||
use Core\Events\AdminPanelBooting;
|
||||
use Core\Events\ConsoleBooting;
|
||||
|
|
@ -53,7 +53,7 @@ class Boot extends ServiceProvider
|
|||
'mcp'
|
||||
);
|
||||
|
||||
$this->app->singleton(\Core\Agentic\Services\AgenticManager::class);
|
||||
$this->app->singleton(\Core\Mod\Agentic\Services\AgenticManager::class);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Configs;
|
||||
namespace Core\Mod\Agentic\Configs;
|
||||
|
||||
use Core\Config\Config;
|
||||
use Core\Agentic\Services\AgenticManager;
|
||||
use Core\Mod\Agentic\Services\AgenticManager;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Console\Commands;
|
||||
namespace Core\Mod\Agentic\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Mod\Content\Jobs\GenerateContentJob;
|
||||
use Mod\Content\Models\ContentBrief;
|
||||
use Mod\Content\Services\AIGatewayService;
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Console\Commands;
|
||||
namespace Core\Mod\Agentic\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Services\PlanTemplateService;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Services\PlanTemplateService;
|
||||
|
||||
class PlanCommand extends Command
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Console\Commands;
|
||||
namespace Core\Mod\Agentic\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Core\Agentic\Models\Task;
|
||||
use Core\Mod\Agentic\Models\Task;
|
||||
|
||||
class TaskCommand extends Command
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Controllers;
|
||||
namespace Core\Mod\Agentic\Controllers;
|
||||
|
||||
use Core\Front\Controller;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
|
|
|||
|
|
@ -2,21 +2,21 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Facades;
|
||||
namespace Core\Mod\Agentic\Facades;
|
||||
|
||||
use Core\Agentic\Services\AgenticManager;
|
||||
use Core\Mod\Agentic\Services\AgenticManager;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
/**
|
||||
* @method static \Core\Agentic\Services\AgenticProviderInterface provider(string $name = null)
|
||||
* @method static \Core\Agentic\Services\ClaudeService claude()
|
||||
* @method static \Core\Agentic\Services\GeminiService gemini()
|
||||
* @method static \Core\Agentic\Services\OpenAIService openai()
|
||||
* @method static \Core\Mod\Agentic\Services\AgenticProviderInterface provider(string $name = null)
|
||||
* @method static \Core\Mod\Agentic\Services\ClaudeService claude()
|
||||
* @method static \Core\Mod\Agentic\Services\GeminiService gemini()
|
||||
* @method static \Core\Mod\Agentic\Services\OpenAIService openai()
|
||||
* @method static array availableProviders()
|
||||
* @method static bool isAvailable(string $name)
|
||||
* @method static void setDefault(string $name)
|
||||
*
|
||||
* @see \Core\Agentic\Services\AgenticManager
|
||||
* @see \Core\Mod\Agentic\Services\AgenticManager
|
||||
*/
|
||||
class Agentic extends Facade
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Jobs;
|
||||
namespace Core\Mod\Agentic\Jobs;
|
||||
|
||||
use Mod\Content\Models\ContentTask;
|
||||
use Illuminate\Bus\Queueable;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Jobs;
|
||||
namespace Core\Mod\Agentic\Jobs;
|
||||
|
||||
use Core\Agentic\Services\AgenticManager;
|
||||
use Core\Mod\Agentic\Services\AgenticManager;
|
||||
use Mod\Content\Models\ContentTask;
|
||||
use Mod\Content\Services\ContentProcessingService;
|
||||
use Core\Mod\Tenant\Services\EntitlementService;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Core\Agentic\Mcp\Prompts;
|
||||
namespace Core\Mod\Agentic\Mcp\Prompts;
|
||||
|
||||
use Laravel\Mcp\Response;
|
||||
use Laravel\Mcp\Server\Prompt;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Core\Agentic\Mcp\Prompts;
|
||||
namespace Core\Mod\Agentic\Mcp\Prompts;
|
||||
|
||||
use Laravel\Mcp\Response;
|
||||
use Laravel\Mcp\Server\Prompt;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Core\Agentic\Mcp\Prompts;
|
||||
namespace Core\Mod\Agentic\Mcp\Prompts;
|
||||
|
||||
use Laravel\Mcp\Response;
|
||||
use Laravel\Mcp\Server\Prompt;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Core\Agentic\Mcp\Servers;
|
||||
namespace Core\Mod\Agentic\Mcp\Servers;
|
||||
|
||||
use Core\Mod\Mcp\Resources\AppConfig;
|
||||
use Core\Mod\Mcp\Resources\ContentResource;
|
||||
|
|
@ -17,10 +17,10 @@ use Core\Mod\Mcp\Tools\ListTables;
|
|||
use Core\Mod\Mcp\Tools\QueryDatabase;
|
||||
use Mod\Bio\Mcp\BioResource;
|
||||
use Laravel\Mcp\Server;
|
||||
use Core\Agentic\Mcp\Prompts\AnalysePerformancePrompt;
|
||||
use Core\Agentic\Mcp\Prompts\ConfigureNotificationsPrompt;
|
||||
use Core\Agentic\Mcp\Prompts\CreateBioPagePrompt;
|
||||
use Core\Agentic\Mcp\Prompts\SetupQrCampaignPrompt;
|
||||
use Core\Mod\Agentic\Mcp\Prompts\AnalysePerformancePrompt;
|
||||
use Core\Mod\Agentic\Mcp\Prompts\ConfigureNotificationsPrompt;
|
||||
use Core\Mod\Agentic\Mcp\Prompts\CreateBioPagePrompt;
|
||||
use Core\Mod\Agentic\Mcp\Prompts\SetupQrCampaignPrompt;
|
||||
|
||||
class HostHub extends Server
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Core\Agentic\Mcp\Servers;
|
||||
namespace Core\Mod\Agentic\Mcp\Servers;
|
||||
|
||||
use Laravel\Mcp\Server;
|
||||
use Mod\Analytics\Mcp\Tools\GeneralAnalyticsTools;
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent;
|
||||
|
||||
use Closure;
|
||||
use Core\Mod\Mcp\Dependencies\HasDependencies;
|
||||
use Core\Mod\Mcp\Exceptions\CircuitOpenException;
|
||||
use Core\Mod\Mcp\Services\CircuitBreaker;
|
||||
use Core\Mod\Mcp\Tools\Concerns\ValidatesDependencies;
|
||||
use Core\Agentic\Mcp\Tools\Agent\Contracts\AgentToolInterface;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\Contracts\AgentToolInterface;
|
||||
|
||||
/**
|
||||
* Base class for MCP Agent Server tools.
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Content;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Content;
|
||||
|
||||
use Mod\Content\Jobs\GenerateContentJob;
|
||||
use Mod\Content\Models\ContentBrief;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Queue multiple briefs for batch content generation.
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Content;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Content;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Mod\Content\Enums\BriefContentType;
|
||||
use Mod\Content\Models\ContentBrief;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Create a content brief for AI generation.
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Content;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Content;
|
||||
|
||||
use Mod\Content\Enums\BriefContentType;
|
||||
use Mod\Content\Models\ContentBrief;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Get details of a specific content brief including generated content.
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Content;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Content;
|
||||
|
||||
use Mod\Content\Enums\BriefContentType;
|
||||
use Mod\Content\Models\ContentBrief;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* List content briefs with optional status filter.
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Content;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Content;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Mod\Content\Enums\BriefContentType;
|
||||
use Mod\Content\Jobs\GenerateContentJob;
|
||||
use Mod\Content\Models\ContentBrief;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Create content briefs from plan tasks and queue for generation.
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Content;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Content;
|
||||
|
||||
use Mod\Content\Jobs\GenerateContentJob;
|
||||
use Mod\Content\Models\ContentBrief;
|
||||
use Mod\Content\Services\AIGatewayService;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Generate content for a brief using AI pipeline.
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Content;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Content;
|
||||
|
||||
use Mod\Content\Models\ContentBrief;
|
||||
use Mod\Content\Services\AIGatewayService;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Get content generation pipeline status.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Content;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Content;
|
||||
|
||||
use Mod\Content\Models\AIUsage;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Get AI usage statistics for content generation.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Contracts;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Contracts;
|
||||
|
||||
/**
|
||||
* Contract for MCP Agent Server tools.
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Phase;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Phase;
|
||||
|
||||
use Core\Agentic\Models\AgentPhase;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPhase;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Add a checkpoint note to a phase.
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Phase;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Phase;
|
||||
|
||||
use Core\Agentic\Models\AgentPhase;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPhase;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Get details of a specific phase within a plan.
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Phase;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Phase;
|
||||
|
||||
use Core\Mod\Mcp\Dependencies\ToolDependency;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Agentic\Models\AgentPhase;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPhase;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
|
||||
/**
|
||||
* Update the status of a phase.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Plan;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Plan;
|
||||
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Archive a completed or abandoned plan.
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Plan;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Plan;
|
||||
|
||||
use Core\Mod\Mcp\Dependencies\ToolDependency;
|
||||
use Illuminate\Support\Str;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Agentic\Models\AgentPhase;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPhase;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
|
||||
/**
|
||||
* Create a new work plan with phases and tasks.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Plan;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Plan;
|
||||
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Get detailed information about a specific plan.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Plan;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Plan;
|
||||
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* List all work plans with their current status and progress.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Plan;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Plan;
|
||||
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Update the status of a plan.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Session;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Session;
|
||||
|
||||
use Core\Agentic\Models\AgentSession;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentSession;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Record an artifact created/modified during the session.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Session;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Session;
|
||||
|
||||
use Core\Agentic\Services\AgentSessionService;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Services\AgentSessionService;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Continue from a previous session (multi-agent handoff).
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Session;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Session;
|
||||
|
||||
use Core\Agentic\Models\AgentSession;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentSession;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* End the current session.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Session;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Session;
|
||||
|
||||
use Core\Agentic\Models\AgentSession;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentSession;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Prepare session for handoff to another agent.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Session;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Session;
|
||||
|
||||
use Core\Agentic\Services\AgentSessionService;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Services\AgentSessionService;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* List sessions, optionally filtered by status.
|
||||
|
|
@ -65,7 +65,7 @@ class SessionList extends AgentTool
|
|||
$sessions = $sessionService->getActiveSessions($context['workspace_id'] ?? null);
|
||||
} else {
|
||||
// Query with filters
|
||||
$query = \Core\Agentic\Models\AgentSession::query()
|
||||
$query = \Core\Mod\Agentic\Models\AgentSession::query()
|
||||
->orderBy('last_active_at', 'desc');
|
||||
|
||||
// Apply workspace filter if provided
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Session;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Session;
|
||||
|
||||
use Core\Mod\Mcp\Dependencies\ToolDependency;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Agentic\Models\AgentSession;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentSession;
|
||||
|
||||
/**
|
||||
* Log an entry in the current session.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Session;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Session;
|
||||
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Agentic\Services\AgentSessionService;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Services\AgentSessionService;
|
||||
|
||||
/**
|
||||
* Replay a session by creating a new session with the original's context.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Session;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Session;
|
||||
|
||||
use Core\Agentic\Services\AgentSessionService;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Services\AgentSessionService;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Resume a paused or handed-off session.
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Session;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Session;
|
||||
|
||||
use Core\Mod\Mcp\Dependencies\ToolDependency;
|
||||
use Illuminate\Support\Str;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Models\AgentSession;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentSession;
|
||||
|
||||
/**
|
||||
* Start a new agent session for a plan.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\State;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\State;
|
||||
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Get a workspace state value.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\State;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\State;
|
||||
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* List all state values for a plan.
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\State;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\State;
|
||||
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Models\AgentWorkspaceState;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentWorkspaceState;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Set a workspace state value.
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Task;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Task;
|
||||
|
||||
use Core\Mod\Mcp\Dependencies\ToolDependency;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Agentic\Models\AgentPhase;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPhase;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
|
||||
/**
|
||||
* Toggle a task completion status.
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Task;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Task;
|
||||
|
||||
use Core\Mod\Mcp\Dependencies\ToolDependency;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Agentic\Models\AgentPhase;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Models\AgentPhase;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
|
||||
/**
|
||||
* Update task details (status, notes).
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Template;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Template;
|
||||
|
||||
use Core\Agentic\Services\PlanTemplateService;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Services\PlanTemplateService;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Create a new plan from a template.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Template;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Template;
|
||||
|
||||
use Core\Agentic\Services\PlanTemplateService;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Services\PlanTemplateService;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* List available plan templates.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Mcp\Tools\Agent\Template;
|
||||
namespace Core\Mod\Agentic\Mcp\Tools\Agent\Template;
|
||||
|
||||
use Core\Agentic\Services\PlanTemplateService;
|
||||
use Core\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
use Core\Mod\Agentic\Services\PlanTemplateService;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\AgentTool;
|
||||
|
||||
/**
|
||||
* Preview a template with variables.
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Middleware;
|
||||
namespace Core\Mod\Agentic\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Core\Agentic\Models\AgentApiKey;
|
||||
use Core\Agentic\Services\AgentApiKeyService;
|
||||
use Core\Mod\Agentic\Models\AgentApiKey;
|
||||
use Core\Mod\Agentic\Services\AgentApiKeyService;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Models;
|
||||
namespace Core\Mod\Agentic\Models;
|
||||
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Models;
|
||||
namespace Core\Mod\Agentic\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Core\Agentic\Database\Factories\AgentPhaseFactory;
|
||||
use Core\Mod\Agentic\Database\Factories\AgentPhaseFactory;
|
||||
|
||||
/**
|
||||
* Agent Phase - individual phase within a plan.
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Models;
|
||||
namespace Core\Mod\Agentic\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Support\Str;
|
||||
use Core\Agentic\Database\Factories\AgentPlanFactory;
|
||||
use Core\Mod\Agentic\Database\Factories\AgentPlanFactory;
|
||||
use Core\Mod\Tenant\Concerns\BelongsToWorkspace;
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Spatie\Activitylog\LogOptions;
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Models;
|
||||
namespace Core\Mod\Agentic\Models;
|
||||
|
||||
use Core\Mod\Tenant\Concerns\BelongsToWorkspace;
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Core\Agentic\Database\Factories\AgentSessionFactory;
|
||||
use Core\Mod\Agentic\Database\Factories\AgentSessionFactory;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Models;
|
||||
namespace Core\Mod\Agentic\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Models;
|
||||
namespace Core\Mod\Agentic\Models;
|
||||
|
||||
use Mod\Content\Models\ContentTask;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Models;
|
||||
namespace Core\Mod\Agentic\Models;
|
||||
|
||||
use Core\Mod\Tenant\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Models;
|
||||
namespace Core\Mod\Agentic\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Core\Mod\Tenant\Concerns\BelongsToWorkspace;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Models;
|
||||
namespace Core\Mod\Agentic\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
|
|
|||
120
Service/Boot.php
Normal file
120
Service/Boot.php
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Service\Agentic;
|
||||
|
||||
use Core\Events\AdminPanelBooting;
|
||||
use Core\Front\Admin\AdminMenuRegistry;
|
||||
use Core\Service\Contracts\ServiceDefinition;
|
||||
use Core\Service\ServiceVersion;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
/**
|
||||
* Agentic Service
|
||||
*
|
||||
* AI agent orchestration service layer.
|
||||
* Uses Core\Agentic as the engine.
|
||||
*/
|
||||
class Boot extends ServiceProvider implements ServiceDefinition
|
||||
{
|
||||
/**
|
||||
* Events this service listens to.
|
||||
*
|
||||
* @var array<class-string, string>
|
||||
*/
|
||||
public static array $listens = [
|
||||
AdminPanelBooting::class => 'onAdminPanel',
|
||||
];
|
||||
|
||||
/**
|
||||
* Bootstrap the service.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
app(AdminMenuRegistry::class)->register($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the service definition for seeding platform_services.
|
||||
*/
|
||||
public static function definition(): array
|
||||
{
|
||||
return [
|
||||
'code' => 'agentic',
|
||||
'module' => 'Agentic',
|
||||
'name' => 'Agentic',
|
||||
'tagline' => 'AI agent orchestration',
|
||||
'description' => 'Build and deploy AI agents with planning, tool use, and conversation capabilities.',
|
||||
'icon' => 'robot',
|
||||
'color' => 'violet',
|
||||
'marketing_domain' => null, // API service, no marketing site yet
|
||||
'website_class' => null,
|
||||
'entitlement_code' => 'core.srv.agentic',
|
||||
'sort_order' => 60,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Admin menu items for this service.
|
||||
*
|
||||
* Agentic is positioned in the dashboard group (not services)
|
||||
* as it's a cross-cutting AI capability, not a standalone product.
|
||||
*/
|
||||
public function adminMenuItems(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
'group' => 'dashboard',
|
||||
'priority' => 5,
|
||||
'entitlement' => 'core.srv.agentic',
|
||||
'item' => fn () => [
|
||||
'label' => 'Agentic',
|
||||
'icon' => 'robot',
|
||||
'color' => 'violet',
|
||||
'active' => request()->routeIs('hub.agents.*'),
|
||||
'children' => [
|
||||
['label' => 'Dashboard', 'icon' => 'gauge', 'href' => route('hub.agents.index'), 'active' => request()->routeIs('hub.agents.index')],
|
||||
['label' => 'Plans', 'icon' => 'list-check', 'href' => route('hub.agents.plans'), 'active' => request()->routeIs('hub.agents.plans*')],
|
||||
['label' => 'Sessions', 'icon' => 'messages', 'href' => route('hub.agents.sessions'), 'active' => request()->routeIs('hub.agents.sessions*')],
|
||||
['label' => 'Tool Analytics', 'icon' => 'chart-bar', 'href' => route('hub.agents.tools'), 'active' => request()->routeIs('hub.agents.tools*')],
|
||||
['label' => 'API Keys', 'icon' => 'key', 'href' => route('hub.agents.api-keys'), 'active' => request()->routeIs('hub.agents.api-keys*')],
|
||||
['label' => 'Templates', 'icon' => 'copy', 'href' => route('hub.agents.templates'), 'active' => request()->routeIs('hub.agents.templates*')],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register admin panel components.
|
||||
*/
|
||||
public function onAdminPanel(AdminPanelBooting $event): void
|
||||
{
|
||||
// Service-specific admin routes could go here
|
||||
// Components are registered by Core\Agentic
|
||||
}
|
||||
|
||||
public function menuPermissions(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function canViewMenu(?object $user, ?object $workspace): bool
|
||||
{
|
||||
return $user !== null;
|
||||
}
|
||||
|
||||
public static function version(): ServiceVersion
|
||||
{
|
||||
return new ServiceVersion(1, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Service dependencies.
|
||||
*/
|
||||
public static function dependencies(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services;
|
||||
namespace Core\Mod\Agentic\Services;
|
||||
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Core\Agentic\Models\AgentApiKey;
|
||||
use Core\Mod\Agentic\Models\AgentApiKey;
|
||||
|
||||
/**
|
||||
* Agent API Key Service.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services;
|
||||
namespace Core\Mod\Agentic\Services;
|
||||
|
||||
use Core\Agentic\Models\AgentApiKey;
|
||||
use Core\Agentic\Support\AgentIdentity;
|
||||
use Core\Mod\Agentic\Models\AgentApiKey;
|
||||
use Core\Mod\Agentic\Support\AgentIdentity;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services;
|
||||
namespace Core\Mod\Agentic\Services;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Models\AgentSession;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentSession;
|
||||
|
||||
/**
|
||||
* Agent Session Service - manages session persistence for agent continuity.
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services;
|
||||
namespace Core\Mod\Agentic\Services;
|
||||
|
||||
use Core\Mod\Api\Models\ApiKey;
|
||||
use Core\Mod\Mcp\Dependencies\HasDependencies;
|
||||
use Core\Mod\Mcp\Services\ToolDependencyService;
|
||||
use Illuminate\Support\Collection;
|
||||
use Core\Agentic\Mcp\Tools\Agent\Contracts\AgentToolInterface;
|
||||
use Core\Mod\Agentic\Mcp\Tools\Agent\Contracts\AgentToolInterface;
|
||||
|
||||
/**
|
||||
* Registry for MCP Agent Server tools.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services;
|
||||
namespace Core\Mod\Agentic\Services;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services;
|
||||
namespace Core\Mod\Agentic\Services;
|
||||
|
||||
interface AgenticProviderInterface
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services;
|
||||
namespace Core\Mod\Agentic\Services;
|
||||
|
||||
class AgenticResponse
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services;
|
||||
namespace Core\Mod\Agentic\Services;
|
||||
|
||||
use Generator;
|
||||
use Illuminate\Http\Client\PendingRequest;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Core\Agentic\Services\Concerns\HasRetry;
|
||||
use Core\Agentic\Services\Concerns\HasStreamParsing;
|
||||
use Core\Mod\Agentic\Services\Concerns\HasRetry;
|
||||
use Core\Mod\Agentic\Services\Concerns\HasStreamParsing;
|
||||
use RuntimeException;
|
||||
|
||||
class ClaudeService implements AgenticProviderInterface
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services\Concerns;
|
||||
namespace Core\Mod\Agentic\Services\Concerns;
|
||||
|
||||
use Illuminate\Http\Client\ConnectionException;
|
||||
use Illuminate\Http\Client\RequestException;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services\Concerns;
|
||||
namespace Core\Mod\Agentic\Services\Concerns;
|
||||
|
||||
use Generator;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services;
|
||||
namespace Core\Mod\Agentic\Services;
|
||||
|
||||
use Mod\Content\Models\ContentItem;
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services;
|
||||
namespace Core\Mod\Agentic\Services;
|
||||
|
||||
use Generator;
|
||||
use Illuminate\Http\Client\PendingRequest;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Core\Agentic\Services\Concerns\HasRetry;
|
||||
use Core\Agentic\Services\Concerns\HasStreamParsing;
|
||||
use Core\Mod\Agentic\Services\Concerns\HasRetry;
|
||||
use Core\Mod\Agentic\Services\Concerns\HasStreamParsing;
|
||||
use RuntimeException;
|
||||
|
||||
class GeminiService implements AgenticProviderInterface
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services;
|
||||
namespace Core\Mod\Agentic\Services;
|
||||
|
||||
use Core\Agentic\Models\AgentApiKey;
|
||||
use Core\Mod\Agentic\Models\AgentApiKey;
|
||||
|
||||
/**
|
||||
* IP Restriction Service.
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services;
|
||||
namespace Core\Mod\Agentic\Services;
|
||||
|
||||
use Generator;
|
||||
use Illuminate\Http\Client\PendingRequest;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Core\Agentic\Services\Concerns\HasRetry;
|
||||
use Core\Agentic\Services\Concerns\HasStreamParsing;
|
||||
use Core\Mod\Agentic\Services\Concerns\HasRetry;
|
||||
use Core\Mod\Agentic\Services\Concerns\HasStreamParsing;
|
||||
use RuntimeException;
|
||||
|
||||
class OpenAIService implements AgenticProviderInterface
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Services;
|
||||
namespace Core\Mod\Agentic\Services;
|
||||
|
||||
use Core\Agentic\Models\AgentPhase;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentPhase;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Support;
|
||||
namespace Core\Mod\Agentic\Support;
|
||||
|
||||
/**
|
||||
* Represents the identity of an AI agent making a request.
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@
|
|||
|
||||
{{-- Variables --}}
|
||||
@php
|
||||
$template = app(\Core\Agentic\Services\PlanTemplateService::class)->get($previewSlug);
|
||||
$template = app(\Core\Mod\Agentic\Services\PlanTemplateService::class)->get($previewSlug);
|
||||
$variables = $template['variables'] ?? [];
|
||||
@endphp
|
||||
@if(!empty($variables))
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\View\Modal\Admin;
|
||||
namespace Core\Mod\Agentic\View\Modal\Admin;
|
||||
|
||||
use Core\Mod\Api\Models\ApiKey;
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\View\Modal\Admin;
|
||||
namespace Core\Mod\Agentic\View\Modal\Admin;
|
||||
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
|
@ -13,8 +13,8 @@ use Livewire\Attributes\Title;
|
|||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
use Core\Agentic\Models\AgentApiKey;
|
||||
use Core\Agentic\Services\AgentApiKeyService;
|
||||
use Core\Mod\Agentic\Models\AgentApiKey;
|
||||
use Core\Mod\Agentic\Services\AgentApiKeyService;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
|
||||
#[Title('API Keys')]
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\View\Modal\Admin;
|
||||
namespace Core\Mod\Agentic\View\Modal\Admin;
|
||||
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Models\AgentSession;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentSession;
|
||||
use Core\Mod\Mcp\Models\McpToolCallStat;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\View\Modal\Admin;
|
||||
namespace Core\Mod\Agentic\View\Modal\Admin;
|
||||
|
||||
use Core\Agentic\Models\AgentPhase;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentPhase;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Layout;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\View\Modal\Admin;
|
||||
namespace Core\Mod\Agentic\View\Modal\Admin;
|
||||
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\View\Modal\Admin;
|
||||
namespace Core\Mod\Agentic\View\Modal\Admin;
|
||||
|
||||
use Core\Mod\Api\Models\ApiKey;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\View\Modal\Admin;
|
||||
namespace Core\Mod\Agentic\View\Modal\Admin;
|
||||
|
||||
use Core\Mod\Mcp\Models\McpApiRequest;
|
||||
use Livewire\Attributes\Layout;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\View\Modal\Admin;
|
||||
namespace Core\Mod\Agentic\View\Modal\Admin;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
|
|
@ -10,7 +10,7 @@ use Livewire\Attributes\Computed;
|
|||
use Livewire\Attributes\Layout;
|
||||
use Livewire\Attributes\Title;
|
||||
use Livewire\Component;
|
||||
use Core\Agentic\Models\AgentSession;
|
||||
use Core\Mod\Agentic\Models\AgentSession;
|
||||
|
||||
#[Title('Session Detail')]
|
||||
#[Layout('hub::admin.layouts.app')]
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\View\Modal\Admin;
|
||||
namespace Core\Mod\Agentic\View\Modal\Admin;
|
||||
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Models\AgentSession;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentSession;
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\View\Modal\Admin;
|
||||
namespace Core\Mod\Agentic\View\Modal\Admin;
|
||||
|
||||
use Core\Agentic\Services\PlanTemplateService;
|
||||
use Core\Mod\Agentic\Services\PlanTemplateService;
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Flux\Flux;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\View\Modal\Admin;
|
||||
namespace Core\Mod\Agentic\View\Modal\Admin;
|
||||
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Core\Mod\Mcp\Models\McpToolCall;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\View\Modal\Admin;
|
||||
namespace Core\Mod\Agentic\View\Modal\Admin;
|
||||
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Core\Mod\Mcp\Models\McpToolCall;
|
||||
|
|
|
|||
313
changelog/2026/jan/PORTING_PLAN.md
Normal file
313
changelog/2026/jan/PORTING_PLAN.md
Normal file
|
|
@ -0,0 +1,313 @@
|
|||
# Agentic Task System - Porting Plan
|
||||
|
||||
MCP-powered workspace for persistent work plans that survive context limits and enable multi-agent collaboration.
|
||||
|
||||
## Why this exists
|
||||
|
||||
- **Context persistence** - Work plans persist across Claude sessions, surviving context window limits
|
||||
- **Multi-agent collaboration** - Handoff support between different agents (Opus, Sonnet, Haiku)
|
||||
- **Checkpoint verification** - Phase gates ensure work is complete before progressing
|
||||
- **Workspace state** - Shared key-value storage for agents to communicate findings
|
||||
|
||||
## Source Location
|
||||
|
||||
```
|
||||
/Users/snider/Code/lab/upstream/
|
||||
├── app/Models/
|
||||
│ ├── AgentPlan.php (6.1KB, ~200 lines)
|
||||
│ ├── AgentPhase.php (7.9KB, ~260 lines)
|
||||
│ ├── AgentSession.php (7.5KB, ~250 lines)
|
||||
│ └── WorkspaceState.php (2.1KB, ~70 lines)
|
||||
├── app/Console/Commands/
|
||||
│ ├── McpAgentServerCommand.php (42KB, ~1200 lines)
|
||||
│ ├── PlanCreateCommand.php (8.5KB)
|
||||
│ ├── PlanListCommand.php (1.8KB)
|
||||
│ ├── PlanShowCommand.php (4.0KB)
|
||||
│ ├── PlanStatusCommand.php (3.7KB)
|
||||
│ ├── PlanCheckCommand.php (5.7KB)
|
||||
│ └── PlanPhaseCommand.php (5.8KB)
|
||||
└── database/migrations/
|
||||
└── 2025_12_31_000001_create_agent_tables.php
|
||||
```
|
||||
|
||||
## Target Location
|
||||
|
||||
```
|
||||
/Users/snider/Code/lab/host.uk.com/
|
||||
├── app/Models/Agent/ # New subdirectory
|
||||
│ ├── AgentPlan.php
|
||||
│ ├── AgentPhase.php
|
||||
│ ├── AgentSession.php
|
||||
│ └── WorkspaceState.php
|
||||
├── app/Console/Commands/Agent/ # New subdirectory
|
||||
│ ├── McpAgentServerCommand.php
|
||||
│ ├── PlanCreateCommand.php
|
||||
│ ├── PlanListCommand.php
|
||||
│ ├── PlanShowCommand.php
|
||||
│ ├── PlanStatusCommand.php
|
||||
│ ├── PlanCheckCommand.php
|
||||
│ └── PlanPhaseCommand.php
|
||||
├── database/migrations/
|
||||
│ └── 2025_12_31_100000_create_agent_tables.php
|
||||
└── tests/Feature/Agent/ # New subdirectory
|
||||
├── AgentPlanTest.php
|
||||
├── AgentPhaseTest.php
|
||||
└── PlanCommandsTest.php
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Phase 1: Database Migration
|
||||
|
||||
Create the migration file with all four tables.
|
||||
|
||||
### Tasks
|
||||
|
||||
- [ ] Create migration `2025_12_31_100000_create_agent_tables.php`
|
||||
- [ ] Tables: `agent_plans`, `agent_phases`, `agent_sessions`, `workspace_states`
|
||||
- [ ] Run migration and verify schema
|
||||
|
||||
### Source File
|
||||
|
||||
Copy from: `upstream/database/migrations/2025_12_31_000001_create_agent_tables.php`
|
||||
|
||||
### Schema Summary
|
||||
|
||||
| Table | Purpose | Key Columns |
|
||||
|-------|---------|-------------|
|
||||
| `agent_plans` | Work plans with phases | slug, title, status, current_phase |
|
||||
| `agent_phases` | Individual phases | order, name, tasks (JSON), status, dependencies |
|
||||
| `agent_sessions` | Agent work sessions | session_id, agent_type, work_log, handoff_notes |
|
||||
| `workspace_states` | Shared key-value state | key, value (JSON), type |
|
||||
|
||||
---
|
||||
|
||||
## Phase 2: Eloquent Models
|
||||
|
||||
Port all four models with namespace adjustment.
|
||||
|
||||
### Tasks
|
||||
|
||||
- [ ] Create `app/Models/Agent/` directory
|
||||
- [ ] Port `AgentPlan.php` - update namespace to `App\Models\Agent`
|
||||
- [ ] Port `AgentPhase.php` - update namespace and relationships
|
||||
- [ ] Port `AgentSession.php` - update namespace
|
||||
- [ ] Port `WorkspaceState.php` - update namespace
|
||||
|
||||
### Namespace Changes
|
||||
|
||||
```php
|
||||
// From (upstream)
|
||||
namespace App\Models;
|
||||
|
||||
// To (host.uk.com)
|
||||
namespace App\Models\Agent;
|
||||
```
|
||||
|
||||
### Relationship Updates
|
||||
|
||||
Update all `use` statements:
|
||||
|
||||
```php
|
||||
use Mod\Agentic\Models\AgentPlan;
|
||||
use Mod\Agentic\Models\AgentPhase;
|
||||
use Mod\Agentic\Models\AgentSession;
|
||||
use Mod\Agentic\Models\WorkspaceState;
|
||||
```
|
||||
|
||||
### Key Methods to Verify
|
||||
|
||||
**AgentPlan:**
|
||||
- `getCurrentPhase()` - proper orWhere scoping with closure
|
||||
- `generateSlug()` - race-condition safe unique slug generation
|
||||
- `checkAllPhasesComplete()` - completion verification
|
||||
|
||||
**AgentPhase:**
|
||||
- `complete()` - wrapped in DB::transaction
|
||||
- `canStart()` - dependency checking
|
||||
- `isPending()`, `isCompleted()`, `isBlocked()`
|
||||
|
||||
---
|
||||
|
||||
## Phase 3: CLI Commands
|
||||
|
||||
Port all plan management commands.
|
||||
|
||||
### Tasks
|
||||
|
||||
- [ ] Create `app/Console/Commands/Agent/` directory
|
||||
- [ ] Port `PlanCreateCommand.php` - markdown import support
|
||||
- [ ] Port `PlanListCommand.php` - list all plans with stats
|
||||
- [ ] Port `PlanShowCommand.php` - detailed plan view
|
||||
- [ ] Port `PlanStatusCommand.php` - status management
|
||||
- [ ] Port `PlanCheckCommand.php` - checkpoint verification
|
||||
- [ ] Port `PlanPhaseCommand.php` - phase management
|
||||
|
||||
### Namespace Changes
|
||||
|
||||
```php
|
||||
// From
|
||||
namespace App\Console\Commands;
|
||||
|
||||
// To
|
||||
namespace App\Console\Commands\Agent;
|
||||
```
|
||||
|
||||
### Command Signatures
|
||||
|
||||
| Command | Signature | Purpose |
|
||||
|---------|-----------|---------|
|
||||
| `plan:create` | `plan:create {slug} {--title=} {--import=} {--activate}` | Create new plan |
|
||||
| `plan:list` | `plan:list {--status=}` | List all plans |
|
||||
| `plan:show` | `plan:show {slug} {--markdown}` | Show plan details |
|
||||
| `plan:status` | `plan:status {slug} {--set=}` | Get/set plan status |
|
||||
| `plan:check` | `plan:check {slug} {phase?}` | Verify phase completion |
|
||||
| `plan:phase` | `plan:phase {slug} {phase} {--status=} {--add-task=} {--complete-task=}` | Manage phases |
|
||||
|
||||
---
|
||||
|
||||
## Phase 4: MCP Agent Server
|
||||
|
||||
Port the MCP server command with all tools and resources.
|
||||
|
||||
### Tasks
|
||||
|
||||
- [ ] Port `McpAgentServerCommand.php` (~1200 lines)
|
||||
- [ ] Update all model imports to use `Mod\Agentic\Models\*`
|
||||
- [ ] Register command in `Kernel.php` or auto-discovery
|
||||
- [ ] Test JSON-RPC protocol over stdio
|
||||
|
||||
### MCP Tools (18 total)
|
||||
|
||||
| Tool | Purpose |
|
||||
|------|---------|
|
||||
| `plan_create` | Create new plan with phases |
|
||||
| `plan_get` | Get plan by slug with all phases |
|
||||
| `plan_list` | List plans (optionally filtered) |
|
||||
| `plan_update` | Update plan status/metadata |
|
||||
| `phase_update` | Update phase status |
|
||||
| `phase_check` | **Checkpoint** - verify phase completion |
|
||||
| `task_add` | Add task to a phase |
|
||||
| `task_complete` | Mark task done |
|
||||
| `session_start` | Begin agent session |
|
||||
| `session_log` | Log action to session |
|
||||
| `session_artifact` | Log file artifact |
|
||||
| `session_handoff` | Prepare for agent handoff |
|
||||
| `session_resume` | Resume from previous session |
|
||||
| `session_complete` | Mark session completed |
|
||||
| `state_set` | Store workspace state |
|
||||
| `state_get` | Retrieve workspace state |
|
||||
| `state_list` | List all state keys |
|
||||
| `state_delete` | Delete state key |
|
||||
|
||||
### MCP Resources (5 total)
|
||||
|
||||
| Resource URI | Purpose |
|
||||
|--------------|---------|
|
||||
| `hosthub://plans` | List of all work plans |
|
||||
| `hosthub://plans/{slug}` | Full plan as markdown |
|
||||
| `hosthub://plans/{slug}/phase/{n}` | Phase tasks as checklist |
|
||||
| `hosthub://state/{plan}/{key}` | Specific state value |
|
||||
| `hosthub://sessions/{id}` | Session handoff context |
|
||||
|
||||
---
|
||||
|
||||
## Phase 5: Tests ✅
|
||||
|
||||
Port and adapt tests for host.uk.com conventions.
|
||||
|
||||
### Tasks
|
||||
|
||||
- [x] Create `app/Mod/Agentic/Tests/Feature/` directory
|
||||
- [x] Create `AgentPlanTest.php` with factory support
|
||||
- [x] Create `AgentPhaseTest.php` with factory support
|
||||
- [x] Create `AgentSessionTest.php` with factory support
|
||||
- [x] Create model factories (`AgentPlanFactory`, `AgentPhaseFactory`, `AgentSessionFactory`)
|
||||
- [x] Run full test suite - 67 tests passing
|
||||
|
||||
### Test Coverage
|
||||
|
||||
- Model CRUD operations
|
||||
- Relationship integrity
|
||||
- Status transitions
|
||||
- Phase dependency checking
|
||||
- Command input/output
|
||||
- MCP protocol compliance (optional E2E)
|
||||
|
||||
---
|
||||
|
||||
## Phase 6: Documentation and Integration
|
||||
|
||||
Finalise integration with host.uk.com.
|
||||
|
||||
### Tasks
|
||||
|
||||
- [ ] Add MCP server config to `mcp.json` example
|
||||
- [ ] Update `CLAUDE.md` with agentic task commands
|
||||
- [ ] Create feature documentation following `_TEMPLATE.md`
|
||||
- [ ] Add to route/command discovery if needed
|
||||
|
||||
### MCP Configuration
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"hosthub-agent": {
|
||||
"command": "php",
|
||||
"args": ["artisan", "mcp:agent-server"],
|
||||
"cwd": "/Users/snider/Code/lab/host.uk.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Verification Checklist
|
||||
|
||||
After each phase, verify:
|
||||
|
||||
- [ ] No syntax errors (`php artisan list` works)
|
||||
- [ ] Migrations run cleanly
|
||||
- [ ] Models can be instantiated
|
||||
- [ ] Commands appear in `php artisan list`
|
||||
- [ ] Tests pass (`php artisan test --filter=Agent`)
|
||||
|
||||
---
|
||||
|
||||
## Files to Copy (Summary)
|
||||
|
||||
| Source | Target | Changes Required |
|
||||
|--------|--------|------------------|
|
||||
| `upstream/database/migrations/2025_12_31_000001_create_agent_tables.php` | `host.uk.com/database/migrations/2025_12_31_100000_create_agent_tables.php` | Rename only |
|
||||
| `upstream/app/Models/AgentPlan.php` | `host.uk.com/app/Models/Agent/AgentPlan.php` | Namespace |
|
||||
| `upstream/app/Models/AgentPhase.php` | `host.uk.com/app/Models/Agent/AgentPhase.php` | Namespace |
|
||||
| `upstream/app/Models/AgentSession.php` | `host.uk.com/app/Models/Agent/AgentSession.php` | Namespace |
|
||||
| `upstream/app/Models/WorkspaceState.php` | `host.uk.com/app/Models/Agent/WorkspaceState.php` | Namespace |
|
||||
| `upstream/app/Console/Commands/McpAgentServerCommand.php` | `host.uk.com/app/Console/Commands/Agent/McpAgentServerCommand.php` | Namespace + imports |
|
||||
| `upstream/app/Console/Commands/Plan*.php` (6 files) | `host.uk.com/app/Console/Commands/Agent/Plan*.php` | Namespace + imports |
|
||||
| `upstream/tests/Feature/Agent*.php` | `host.uk.com/tests/Feature/Agent/*.php` | Namespace |
|
||||
| `upstream/tests/Feature/PlanCommandsTest.php` | `host.uk.com/tests/Feature/Agent/PlanCommandsTest.php` | Namespace |
|
||||
|
||||
---
|
||||
|
||||
## Estimated Effort
|
||||
|
||||
| Phase | Complexity | Notes |
|
||||
|-------|------------|-------|
|
||||
| 1. Migration | Low | Direct copy |
|
||||
| 2. Models | Low | Namespace changes only |
|
||||
| 3. CLI Commands | Medium | 7 files, namespace + import updates |
|
||||
| 4. MCP Server | Medium | Large file, many import updates |
|
||||
| 5. Tests | Low | Namespace changes |
|
||||
| 6. Documentation | Low | Config and docs |
|
||||
|
||||
---
|
||||
|
||||
## Related Services
|
||||
|
||||
- `ContentProcessingService` - May benefit from agent tracking
|
||||
- `EntitlementService` - No direct relation
|
||||
- Existing `Task` model - Different purpose (simple tasks vs agent plans)
|
||||
|
||||
See also: `/Users/snider/Code/lab/upstream/CLAUDE.md` for original implementation details.
|
||||
2214
changelog/2026/jan/TASK-006-agent-plans-admin-ui.md
Normal file
2214
changelog/2026/jan/TASK-006-agent-plans-admin-ui.md
Normal file
File diff suppressed because it is too large
Load diff
186
changelog/2026/jan/agentic-tasks-readme.md
Normal file
186
changelog/2026/jan/agentic-tasks-readme.md
Normal file
|
|
@ -0,0 +1,186 @@
|
|||
# Agentic Task System
|
||||
|
||||
MCP-powered workspace for persistent work plans that survive context limits and enable multi-agent collaboration.
|
||||
|
||||
## Why this exists
|
||||
|
||||
- **Context persistence** - Work plans persist across Claude sessions, surviving context window limits
|
||||
- **Multi-agent collaboration** - Handoff support between different agents with shared state
|
||||
- **Checkpoint verification** - Phase gates ensure work is complete before progressing
|
||||
- **Structured planning** - Break complex tasks into phases with dependencies
|
||||
|
||||
## Location
|
||||
|
||||
```
|
||||
app/Models/Agent/AgentPlan.php
|
||||
app/Models/Agent/AgentPhase.php
|
||||
app/Models/Agent/AgentSession.php
|
||||
app/Models/Agent/WorkspaceState.php
|
||||
app/Console/Commands/Agent/McpAgentServerCommand.php
|
||||
```
|
||||
|
||||
## Basic usage
|
||||
|
||||
```bash
|
||||
# Create a new plan
|
||||
php artisan plan:create my-feature --title="Implement Feature X"
|
||||
|
||||
# Import from markdown
|
||||
php artisan plan:create my-plan --import=PLAN.md --activate
|
||||
|
||||
# List all plans
|
||||
php artisan plan:list
|
||||
php artisan plan:list --status=active
|
||||
|
||||
# Show plan details
|
||||
php artisan plan:show my-plan
|
||||
php artisan plan:show my-plan --markdown
|
||||
|
||||
# Check phase completion (checkpoint)
|
||||
php artisan plan:check my-plan
|
||||
php artisan plan:check my-plan 1 # Check specific phase
|
||||
|
||||
# Manage phases
|
||||
php artisan plan:phase my-plan 1 --status=in_progress
|
||||
php artisan plan:phase my-plan 1 --add-task="Complete the migration"
|
||||
php artisan plan:phase my-plan 1 --complete-task=0
|
||||
```
|
||||
|
||||
## Key methods
|
||||
|
||||
### AgentPlan
|
||||
|
||||
```php
|
||||
use Mod\Agentic\Models\AgentPlan;
|
||||
|
||||
// Create a plan
|
||||
$plan = AgentPlan::create([
|
||||
'slug' => 'my-feature',
|
||||
'title' => 'Implement Feature X',
|
||||
'status' => AgentPlan::STATUS_ACTIVE,
|
||||
]);
|
||||
|
||||
// Get current phase
|
||||
$phase = $plan->getCurrentPhase();
|
||||
// Returns: AgentPhase or null
|
||||
|
||||
// Check completion
|
||||
$plan->checkAllPhasesComplete();
|
||||
// Returns: bool
|
||||
```
|
||||
|
||||
### AgentPhase
|
||||
|
||||
```php
|
||||
use Mod\Agentic\Models\AgentPhase;
|
||||
|
||||
// Start a phase
|
||||
$phase->start();
|
||||
// Returns: self (status changed to in_progress)
|
||||
|
||||
// Complete a phase (with transaction protection)
|
||||
$phase->complete();
|
||||
// Returns: self (status changed to completed, plan auto-completes if all done)
|
||||
|
||||
// Check if phase can start (dependencies met)
|
||||
$phase->canStart();
|
||||
// Returns: bool
|
||||
```
|
||||
|
||||
### WorkspaceState
|
||||
|
||||
```php
|
||||
use Mod\Agentic\Models\WorkspaceState;
|
||||
|
||||
// Store shared state
|
||||
WorkspaceState::setValue($plan, 'api_findings', ['endpoints' => 12]);
|
||||
|
||||
// Retrieve state
|
||||
$value = WorkspaceState::getValue($plan, 'api_findings');
|
||||
// Returns: array or null
|
||||
```
|
||||
|
||||
## Example: Checkpoint pattern
|
||||
|
||||
The checkpoint pattern ensures agents verify previous work before progressing:
|
||||
|
||||
```
|
||||
Agent: "Starting Phase 3"
|
||||
↓
|
||||
MCP: phase_check(plan_slug, phase=2)
|
||||
↓
|
||||
Returns: {
|
||||
"complete": false,
|
||||
"remaining_tasks": ["Task 2.4", "Task 2.5"],
|
||||
"message": "Phase 2 not complete. 2 tasks remaining."
|
||||
}
|
||||
↓
|
||||
Agent: "Completing remaining Phase 2 tasks first..."
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
MCP server configuration for Claude Code:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"hosthub-agent": {
|
||||
"command": "php",
|
||||
"args": ["artisan", "mcp:agent-server"],
|
||||
"cwd": "/path/to/host.uk.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## How it works
|
||||
|
||||
```
|
||||
1. Plan created with phases (via CLI or MCP)
|
||||
2. Agent starts session and binds to plan
|
||||
3. Agent works through phases, logging actions
|
||||
4. Checkpoint verification before phase transitions
|
||||
5. Workspace state shared between agents
|
||||
6. Handoff notes preserved for context continuity
|
||||
```
|
||||
|
||||
## MCP Tools
|
||||
|
||||
| Tool | Purpose |
|
||||
|------|---------|
|
||||
| `plan_create` | Create new plan with phases |
|
||||
| `plan_get` | Get plan by slug with all phases |
|
||||
| `plan_list` | List plans (optionally filtered) |
|
||||
| `plan_update` | Update plan status/metadata |
|
||||
| `phase_update` | Update phase status |
|
||||
| `phase_check` | Verify phase completion |
|
||||
| `task_add` | Add task to a phase |
|
||||
| `task_complete` | Mark task done |
|
||||
| `session_start` | Begin agent session |
|
||||
| `session_log` | Log action to session |
|
||||
| `session_artifact` | Log file artifact |
|
||||
| `session_handoff` | Prepare for agent handoff |
|
||||
| `session_resume` | Resume from previous session |
|
||||
| `session_complete` | Mark session completed |
|
||||
| `state_set` | Store workspace state |
|
||||
| `state_get` | Retrieve workspace state |
|
||||
| `state_list` | List all state keys |
|
||||
| `state_delete` | Delete state key |
|
||||
|
||||
## MCP Resources
|
||||
|
||||
| URI | Purpose |
|
||||
|-----|---------|
|
||||
| `hosthub://plans` | List of all work plans |
|
||||
| `hosthub://plans/{slug}` | Full plan as markdown |
|
||||
| `hosthub://plans/{slug}/phase/{n}` | Phase tasks as checklist |
|
||||
| `hosthub://state/{plan}/{key}` | Specific state value |
|
||||
| `hosthub://sessions/{id}` | Session handoff context |
|
||||
|
||||
## Related services
|
||||
|
||||
- `Task` model - Simple task tracking (different purpose)
|
||||
- `ContentTask` model - Content generation tasks
|
||||
|
||||
See also: `doc/dev-feat-docs/agentic-tasks/PORTING_PLAN.md` for implementation details.
|
||||
107
changelog/2026/jan/code-review.md
Normal file
107
changelog/2026/jan/code-review.md
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
# Agentic Module Review
|
||||
|
||||
**Updated:** 2026-01-21 - OpenAI pricing, MCP token lookup, and Boot.php cleanup verified complete
|
||||
|
||||
## Overview
|
||||
|
||||
The Agentic module provides AI agent infrastructure for Host Hub, including:
|
||||
|
||||
1. **Multi-provider AI abstraction** - Unified interface for Claude, Gemini, and OpenAI APIs
|
||||
2. **Agent work plans** - Structured task tracking with phases, dependencies, and progress
|
||||
3. **Session management** - Track agent work sessions for handoff and context recovery
|
||||
4. **API key management** - Workspace-scoped keys with permissions and rate limiting
|
||||
5. **Plan templates** - YAML-based reusable plan structures
|
||||
6. **Content generation pipeline** - Batch content generation with quality validation
|
||||
7. **Agent detection** - Identify AI agents from HTTP requests (Trees for Agents)
|
||||
8. **Admin dashboard** - Hades-only admin panel for monitoring agent operations
|
||||
|
||||
## Production Readiness Score: 88/100 (was 85/100 - Additional improvements 2026-01-21)
|
||||
|
||||
The module has solid foundational architecture. Critical issues fixed in Wave 2. All recommended improvements now implemented. OpenAI pricing, MCP token database lookup, and Boot.php cleanup completed.
|
||||
|
||||
## Critical Issues (Must Fix)
|
||||
|
||||
- [x] **Missing `agent_api_keys` table migration** - FIXED: Migration exists at `Migrations/2026_01_15_090000_create_agent_api_keys_table.php`.
|
||||
- [x] **Missing `tasks` table migration** - FIXED: Migration exists at `Migrations/2026_01_15_090001_create_tasks_table.php`. Task model updated with `BelongsToWorkspace` trait and `workspace_id` in fillable.
|
||||
- [x] **`AgenticResponse::estimateCost()` missing OpenAI pricing** - FIXED: Pricing array now includes GPT-4o, GPT-4o-mini, GPT-4-turbo, GPT-4, GPT-3.5-turbo, o1, o1-mini, and o1-preview models.
|
||||
- [x] **`AgentApiKey::getRecentCallCount()` is a stub** - FIXED: Now reads from cache key `agent_api_key_rate:{id}` which is incremented by `AgentApiKeyService::recordUsage()`.
|
||||
- [x] **`PlanCommand`/`TaskCommand` missing workspace scope** - FIXED: Both commands now require `--workspace=ID` option or authenticated user context. All queries scoped via `forWorkspace()` to prevent data leakage.
|
||||
|
||||
## Recommended Improvements
|
||||
|
||||
- [x] **Add retry logic to AI provider services** - FIXED: HasRetry trait added with exponential backoff for transient failures.
|
||||
- [x] **Stream parsing is fragile** - FIXED: HasStreamParsing trait added for robust chunked response handling.
|
||||
- [x] **ContentService uses hardcoded paths** - FIXED: `$batchPath`, `$promptPath`, `$draftsPath` now use config values.
|
||||
- [x] **AgentApiKeyService rate limit TTL is incorrect** - FIXED: Now uses `Cache::add()` with TTL to prevent race condition.
|
||||
- [x] **Missing validation on PlanTemplateService variable substitution** - FIXED: JSON escaping added to prevent data corruption from special characters.
|
||||
- [x] **Dashboard queries not optimised** - FIXED: `cacheWithLock` added to prevent cache stampede.
|
||||
- [x] **Add middleware for admin routes** - FIXED: RequireHades middleware now applied to `/hub/agents/*` routes.
|
||||
- [x] **Add request validation to ForAgentsController** - FIXED: Rate limiting and caching added.
|
||||
|
||||
## Missing Features (Future)
|
||||
|
||||
- [x] **MCP tool handlers commented out** - FIXED: `Boot::onMcpTools()` now has clean documentation explaining that agent tools are registered in Mcp module via AgentToolRegistry.
|
||||
- [x] **MCP token lookup not implemented** - FIXED: `AgentDetection::identifyFromMcpToken()` now supports opaque `ak_` prefix tokens with database lookup via `AgentApiKey::findByKey()`, plus structured `provider:model:secret` format.
|
||||
- [ ] **No tests for AgentApiKey model** - Unlike other models (AgentPlan, AgentPhase, AgentSession), AgentApiKey has no dedicated test file.
|
||||
- [ ] **No tests for AI provider services** - ClaudeService, GeminiService, OpenAIService have no unit tests.
|
||||
- [ ] **No tests for AgentApiKeyService** - Service has complex authentication logic but no tests.
|
||||
- [ ] **No tests for AgentDetection** - User-Agent pattern matching logic is untested.
|
||||
- [ ] **No tests for PlanTemplateService** - Variable substitution and plan creation untested.
|
||||
- [ ] **Missing admin panel tests for all Livewire components** - Only `UseCase/AdminPanelBasic.php` exists but may not execute (uses non-standard test syntax).
|
||||
- [ ] **GenerateCommand depends on Content module** - Uses `Mod\Content\Models\ContentBrief`, `Mod\Content\Jobs\GenerateContentJob`, etc. Should verify Content module is always loaded.
|
||||
|
||||
## Test Coverage Assessment
|
||||
|
||||
**Current test files:**
|
||||
- `Tests/Feature/AgentPlanTest.php` - 17 tests, good coverage of plan lifecycle
|
||||
- `Tests/Feature/AgentPhaseTest.php` - 17 tests, good coverage of phase operations
|
||||
- `Tests/Feature/AgentSessionTest.php` - 22 tests, thorough session tracking tests
|
||||
- `Tests/Feature/ContentServiceTest.php` - 4 tests, basic coverage using mocks
|
||||
- `Tests/UseCase/AdminPanelBasic.php` - UI acceptance tests (may not be functional)
|
||||
|
||||
**Coverage gaps:**
|
||||
- No unit tests for any of the 11 services
|
||||
- No tests for 3 console commands
|
||||
- No tests for AgentApiKey model
|
||||
- No tests for Task model
|
||||
- No tests for admin Livewire components
|
||||
- No integration tests for AI provider APIs
|
||||
|
||||
**Estimated coverage:** ~35% (models well-tested, services untested)
|
||||
|
||||
## Security Concerns
|
||||
|
||||
1. **API key stored as SHA-256 hash only** - No salt used in `AgentApiKey::generate()`. While SHA-256 is acceptable, using `password_hash()` with Argon2 would be more secure for credential storage.
|
||||
|
||||
2. **Rate limiting bypass** - FIXED: `getRecentCallCount()` now reads from cache, making rate limiting functional when `AgentApiKeyService::recordUsage()` is called.
|
||||
|
||||
3. **No input validation on plan/template variables** - `PlanTemplateService::substituteVariables()` uses regex replacement without sanitising input, potentially allowing injection.
|
||||
|
||||
4. **Admin routes lack middleware** - FIXED: RequireHades middleware now applied to admin routes.
|
||||
|
||||
5. **ForAgentsController exposes internal URLs** - Returns hardcoded URLs to MCP registry and documentation that could be enumerated by attackers.
|
||||
|
||||
6. **TaskCommand uses FIELD() with unescaped values** - `orderByRaw("FIELD(priority, 'urgent', 'high', 'normal', 'low')")` - while current usage is safe (status/priority are validated), this pattern is SQL injection prone if extended.
|
||||
|
||||
## Notes
|
||||
|
||||
**Architecture:** Well-structured following the modular monolith pattern. Boot.php properly uses event listeners for lazy loading. Services are appropriately separated.
|
||||
|
||||
**Code quality:** Consistent use of strict types, proper PHPDoc annotations, and Eloquent conventions. Factory pattern for test data is well implemented.
|
||||
|
||||
**Dependencies on other modules:**
|
||||
- `Mod\Tenant` - Workspace model and BelongsToWorkspace trait
|
||||
- `Mod\Mcp` - McpToolCallStat for dashboard analytics
|
||||
- `Mod\Content` - ContentBrief, AIUsage, GenerateContentJob (in GenerateCommand)
|
||||
|
||||
**Files reviewed:**
|
||||
- `/app/Mod/Agentic/Boot.php`
|
||||
- `/app/Mod/Agentic/config.php`
|
||||
- `/app/Mod/Agentic/Migrations/2026_01_15_100000_create_agentic_tables.php`
|
||||
- All 11 models in `/app/Mod/Agentic/Models/`
|
||||
- All 9 services in `/app/Mod/Agentic/Services/`
|
||||
- All 3 console commands in `/app/Mod/Agentic/Console/Commands/`
|
||||
- `/app/Mod/Agentic/Controllers/ForAgentsController.php`
|
||||
- `/app/Mod/Agentic/Routes/admin.php`
|
||||
- All 4 test files in `/app/Mod/Agentic/Tests/`
|
||||
- `/app/Mod/Agentic/View/Modal/Admin/Dashboard.php`
|
||||
72
changelog/2026/jan/features.md
Normal file
72
changelog/2026/jan/features.md
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# Core-Agentic - January 2026
|
||||
|
||||
## Features Implemented
|
||||
|
||||
### Agent Plans Admin UI (TASK-006)
|
||||
|
||||
Complete admin interface for managing agent work plans.
|
||||
|
||||
**Components:**
|
||||
- Plan list with status filters
|
||||
- Plan editor with phases
|
||||
- Phase management (add, edit, reorder)
|
||||
- Progress tracking
|
||||
- Session viewer
|
||||
|
||||
**Files:**
|
||||
- `View/Modal/Admin/PlanManager.php`
|
||||
- `View/Modal/Admin/PlanEditor.php`
|
||||
- `View/Modal/Admin/PhaseEditor.php`
|
||||
|
||||
---
|
||||
|
||||
### Session Recovery/Replay
|
||||
|
||||
Resume and replay agent sessions across context windows.
|
||||
|
||||
**Methods:**
|
||||
- `getReplayContext()` - reconstruct session state
|
||||
- `createReplaySession()` - spawn continuation session
|
||||
- Checkpoint and decision tracking
|
||||
|
||||
**MCP Tool:**
|
||||
- `session_replay` - replay tool for agents
|
||||
|
||||
---
|
||||
|
||||
### Agent API Keys
|
||||
|
||||
Scoped API keys for agent authentication.
|
||||
|
||||
**Features:**
|
||||
- Key generation with prefixes
|
||||
- Scope restrictions
|
||||
- Usage tracking
|
||||
- IP restrictions
|
||||
|
||||
**Files:**
|
||||
- `Models/AgentApiKey.php`
|
||||
- `Services/AgentApiKeyService.php`
|
||||
- `Services/IpRestrictionService.php`
|
||||
|
||||
---
|
||||
|
||||
### MCP Usage Quotas
|
||||
|
||||
Per-workspace usage limits for MCP operations.
|
||||
|
||||
**Files:**
|
||||
- `Models/McpUsageQuota.php`
|
||||
- `Services/McpQuotaService.php`
|
||||
- Quota middleware
|
||||
- Entitlement feature integration
|
||||
|
||||
---
|
||||
|
||||
### Plan Templates
|
||||
|
||||
Reusable plan templates for common workflows.
|
||||
|
||||
**Files:**
|
||||
- `Services/PlanTemplateService.php`
|
||||
- Template MCP tools
|
||||
|
|
@ -1,49 +1,50 @@
|
|||
{
|
||||
"name": "host-uk/core-agentic",
|
||||
"description": "AI agent orchestration and MCP tools for Laravel",
|
||||
"keywords": [
|
||||
"ai",
|
||||
"agents",
|
||||
"mcp",
|
||||
"orchestration"
|
||||
],
|
||||
"license": "EUPL-1.2",
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"host-uk/core": "dev-main"
|
||||
},
|
||||
"require-dev": {
|
||||
"laravel/pint": "^1.18",
|
||||
"orchestra/testbench": "^9.0|^10.0",
|
||||
"pestphp/pest": "^3.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Core\\Agentic\\": ""
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Core\\Agentic\\Tests\\": "Tests/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Core\\Agentic\\Boot"
|
||||
]
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "pint",
|
||||
"test": "pest"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true,
|
||||
"allow-plugins": {
|
||||
"pestphp/pest-plugin": true
|
||||
}
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
"name": "host-uk/core-agentic",
|
||||
"description": "AI agent orchestration and MCP tools for Laravel",
|
||||
"keywords": [
|
||||
"ai",
|
||||
"agents",
|
||||
"mcp",
|
||||
"orchestration"
|
||||
],
|
||||
"license": "EUPL-1.2",
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"host-uk/core": "dev-main"
|
||||
},
|
||||
"require-dev": {
|
||||
"laravel/pint": "^1.18",
|
||||
"orchestra/testbench": "^9.0|^10.0",
|
||||
"pestphp/pest": "^3.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Core\\Mod\\Agentic\\": "",
|
||||
"Core\\Service\\Agentic\\": "Service/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Core\\Mod\\Agentic\\Tests\\": "Tests/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Core\\Mod\\Agentic\\Boot"
|
||||
]
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "pint",
|
||||
"test": "pest"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true,
|
||||
"allow-plugins": {
|
||||
"pestphp/pest-plugin": true
|
||||
}
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,19 +17,19 @@ Route::prefix('hub')->name('hub.')->group(function () {
|
|||
->middleware(['auth', RequireHades::class])
|
||||
->group(function () {
|
||||
// Phase 1: Plan Dashboard
|
||||
Route::get('/', \Core\Agentic\View\Modal\Admin\Dashboard::class)->name('index');
|
||||
Route::get('/plans', \Core\Agentic\View\Modal\Admin\Plans::class)->name('plans');
|
||||
Route::get('/plans/{slug}', \Core\Agentic\View\Modal\Admin\PlanDetail::class)->name('plans.show');
|
||||
Route::get('/', \Core\Mod\Agentic\View\Modal\Admin\Dashboard::class)->name('index');
|
||||
Route::get('/plans', \Core\Mod\Agentic\View\Modal\Admin\Plans::class)->name('plans');
|
||||
Route::get('/plans/{slug}', \Core\Mod\Agentic\View\Modal\Admin\PlanDetail::class)->name('plans.show');
|
||||
// Phase 2: Session Monitor
|
||||
Route::get('/sessions', \Core\Agentic\View\Modal\Admin\Sessions::class)->name('sessions');
|
||||
Route::get('/sessions/{id}', \Core\Agentic\View\Modal\Admin\SessionDetail::class)->name('sessions.show');
|
||||
Route::get('/sessions', \Core\Mod\Agentic\View\Modal\Admin\Sessions::class)->name('sessions');
|
||||
Route::get('/sessions/{id}', \Core\Mod\Agentic\View\Modal\Admin\SessionDetail::class)->name('sessions.show');
|
||||
// Phase 3: Tool Analytics
|
||||
Route::get('/tools', \Core\Agentic\View\Modal\Admin\ToolAnalytics::class)->name('tools');
|
||||
Route::get('/tools/calls', \Core\Agentic\View\Modal\Admin\ToolCalls::class)->name('tools.calls');
|
||||
Route::get('/tools', \Core\Mod\Agentic\View\Modal\Admin\ToolAnalytics::class)->name('tools');
|
||||
Route::get('/tools/calls', \Core\Mod\Agentic\View\Modal\Admin\ToolCalls::class)->name('tools.calls');
|
||||
// Phase 4: API Key Management
|
||||
Route::get('/api-keys', \Core\Agentic\View\Modal\Admin\ApiKeys::class)->name('api-keys');
|
||||
Route::get('/api-keys', \Core\Mod\Agentic\View\Modal\Admin\ApiKeys::class)->name('api-keys');
|
||||
// Phase 5: Plan Templates
|
||||
Route::get('/templates', \Core\Agentic\View\Modal\Admin\Templates::class)->name('templates');
|
||||
Route::get('/templates', \Core\Mod\Agentic\View\Modal\Admin\Templates::class)->name('templates');
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Tests\Feature;
|
||||
namespace Core\Mod\Agentic\Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Core\Agentic\Models\AgentPhase;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentPhase;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Tests\TestCase;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Tests\Feature;
|
||||
namespace Core\Mod\Agentic\Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Core\Agentic\Models\AgentPhase;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentPhase;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Tests\TestCase;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Core\Agentic\Tests\Feature;
|
||||
namespace Core\Mod\Agentic\Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Core\Agentic\Models\AgentPlan;
|
||||
use Core\Agentic\Models\AgentSession;
|
||||
use Core\Mod\Agentic\Models\AgentPlan;
|
||||
use Core\Mod\Agentic\Models\AgentSession;
|
||||
use Core\Mod\Tenant\Models\Workspace;
|
||||
use Tests\TestCase;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Core\Agentic\Services\AgenticManager;
|
||||
use Core\Agentic\Services\AgenticProviderInterface;
|
||||
use Core\Agentic\Services\ContentService;
|
||||
use Core\Mod\Agentic\Services\AgenticManager;
|
||||
use Core\Mod\Agentic\Services\AgenticProviderInterface;
|
||||
use Core\Mod\Agentic\Services\ContentService;
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
||||
beforeEach(function () {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue