// ScanForge agent contracts for the future SHiRE backend.
// These are interface contracts only — the UI must NOT fabricate successful
// responses when the SHiRE backend or Scan Bridge is unavailable.

export const agentRegistryEntry = {
  id: 'scanforge',
  name: 'ScanForge Scanner Agent',
  shortName: 'ScanForge',
  description: 'Kinect capture, mesh reconstruction and 3D-print preparation.',
  category: 'Design and Capture',
  route: '/agents/scanforge',
  icon: 'scan-3d',
  provider: 'SHiRE',
  requiresLocalBridge: true,
  requiredCapability: 'scanner.kinect.v1',
  supportsStandalone: true
};

// Agent states shown on the Agents-tab card.
export const AGENT_STATES = [
  'Unavailable', 'Starting', 'Online', 'Waiting for Bridge', 'Kinect unavailable',
  'Ready', 'Scanning', 'Paused', 'Processing', 'Warning', 'Failed'
];

// Logical SHiRE agent operations exposed by ShireScanForgeAgentClient.
export const AGENT_OPERATIONS = [
  'GET /api/v1/agents/scanforge',
  'GET /api/v1/agents/scanforge/status',
  'GET /api/v1/agents/scanforge/capabilities',
  'POST /api/v1/agents/scanforge/start',
  'POST /api/v1/agents/scanforge/stop',
  'POST /api/v1/agents/scanforge/restart',
  'GET /api/v1/agents/scanforge/projects',
  'GET /api/v1/agents/scanforge/jobs',
  'POST /api/v1/agents/scanforge/actions',
  'WS /ws/v1/agents/scanforge'
];

// Structured actions the SHiRE assistant may send into ScanForge.
export const AGENT_ACTIONS = [
  'open_dashboard', 'new_scan', 'start_capture', 'pause_capture', 'resume_capture',
  'finish_capture', 'cancel_capture', 'process_scan', 'open_mesh', 'run_print_check',
  'prepare_export', 'send_to_forge', 'save_to_shirevault'
];

// User-facing agent actions surfaced in the module header / Agents card.
export const AGENT_USER_ACTIONS = [
  'Open Scanner Dashboard', 'Start New Scan', 'Resume Active Project', 'Run Scanner Test',
  'Reconnect Scan Bridge', 'Start Calibration', 'View Processing Job', 'Open Latest Mesh',
  'Run Print Check', 'Open Export Manager', 'Stop Current Capture', 'Emergency Stop Scanner'
];

// Structured notifications ScanForge may raise to SHiRE. Each links back to /agents/scanforge.
export const NOTIFICATION_TYPES = [
  'kinect_disconnected', 'scan_bridge_offline', 'scanner_ready', 'calibration_required',
  'tracking_lost', 'scan_paused', 'capture_complete', 'processing_complete',
  'processing_failed', 'mesh_requires_repair', 'print_check_complete',
  'shirevault_unavailable', 'export_complete'
];