{
  "contract_id": "yeffai_generic_remote_executor_contract",
  "version": "v1.0",
  "status": "ENABLED_PENDING_STEP_APPROVAL",
  "created_at": "2026-07-01T20:27:50Z",
  "updated_at": "2026-07-07T21:45:17.557818+00:00",
  "authority": "Canonical execution bridge for controlled Waresites-to-YEFFAI remote actions, evidence emission, ledger registration, runtime binding and automatic UI progress.",
  "scope": "generic_remote_executor_to_runtime_ui_chain",
  "control_plane": "waresites",
  "target_server": "YEFFAI",
  "communication_model": {
    "authorized_direction_now": "WARESITES_TO_YEFFAI_READ_ONLY_PULL",
    "future_execution_direction_after_approval": "WARESITES_TO_YEFFAI_APPROVED_COMMAND_ONLY",
    "yeffai_to_waresites_reverse_channel_required_now": "NO",
    "yeffai_to_waresites_reverse_channel_enabled": "NO",
    "reverse_ssh_tunnel_allowed": "NO",
    "public_callback_endpoint_allowed_now": "NO"
  },
  "execution_state": {
    "generic_remote_executor_enabled": "NO",
    "real_shell_execution_enabled": "NO",
    "remote_yeffai_mutation_enabled": "NO",
    "remote_yeffai_mutation": "NO",
    "installation_command_executed": "YES",
    "installation_started": "YES",
    "step_001_executed": "YES",
    "ui_patch_applied": "NO",
    "generic_remote_executor_enabled_at": "2026-07-01T20:58:06Z",
    "last_step_executed": "YEFFAI_INSTALL_STEP_001_SERVER_BASELINE_CONFIG",
    "last_step_status": "PASS"
  },
  "required_chain": [
    "authorized_job",
    "operator_approval_gate",
    "command_allowlist",
    "generic_remote_executor",
    "remote_precheck_evidence",
    "remote_command_execution_evidence",
    "remote_postcheck_evidence",
    "rollback_evidence_or_recovery_path",
    "execution_ledger_jsonl_event",
    "runtime_status_php_fields",
    "runtime_truth_js_generic_binding",
    "UI_donut_and_progress_from_runtime_only"
  ],
  "canonical_dependencies": {
    "job_queue_contract": "/home/yeff/public_html/devon/canon/execution/state/execution_job_queue_contract.json",
    "job_execution_policy": "/home/yeff/public_html/devon/canon/execution/state/job_execution_policy.json",
    "shell_gate_contract": "/home/yeff/public_html/devon/canon/execution/state/tool_registry_shell_gate_contract.json",
    "terminal_output_contract": "/home/yeff/public_html/devon/canon/execution/state/terminal_output_contract.json",
    "pull_worker_contract": "/home/yeff/public_html/devon/canon/execution/state/yeffai_target_pull_worker_contract.json",
    "runtime_status": "/home/yeff/public_html/devon/canon/execution/ui/runtime_status.php",
    "runtime_truth": "/home/yeff/public_html/devon/canon/execution/ui/runtime_truth.js"
  },
  "ui_progress_policy": {
    "manual_progress_patch_allowed": "NO",
    "per_step_ui_patch_allowed": "NO",
    "approval_gate_can_set_completion": "NO",
    "completion_display_allowed_before_execution": "NO",
    "progress_source": "generic_remote_executor_evidence_only",
    "donut_source": "runtime_status.php only",
    "line_progress_source": "runtime_status.php only"
  },
  "enablement_requirements": {
    "separate_enablement_patch_required": "YES",
    "explicit_operator_approval_required": "YES",
    "allowlist_required": "YES",
    "allowlist_must_be_step_scoped": "YES",
    "no_unrestricted_root_shell": "YES",
    "backup_required_before_remote_mutation": "YES",
    "rollback_required_for_mutating_action": "YES",
    "ledger_event_required": "YES",
    "runtime_field_mapping_required": "YES",
    "terminal_output_redaction_required": "YES",
    "remote_evidence_schema_required": "YES"
  },
  "evidence_schema": {
    "executor_run_id": "string",
    "job_id": "string",
    "action": "string",
    "target": "YEFFAI",
    "status": "PASS|FAIL|MISSING|RUNNING|BLOCKED",
    "started_at": "iso8601",
    "finished_at": "iso8601|null",
    "remote_yeffai_mutation": "NO",
    "installation_command_executed": "YES|NO",
    "installation_started": "YES|NO",
    "progress_percent": "0..100|null",
    "current_step_label": "string",
    "precheck": "object",
    "command_template": "string",
    "command_result": "object",
    "postcheck": "object",
    "rollback": "object",
    "raw_output_path": "string",
    "evidence_path": "string",
    "ledger_event_id": "string|null"
  },
  "future_step001_allowlist_candidate": {
    "status": "BLOCKED_UNTIL_STEP001_EXECUTION_APPROVAL",
    "allowed_after_approval_only": [
      "mkdir -p /opt/yeffai/runtime /opt/yeffai/state /opt/yeffai/logs /opt/yeffai/backup /opt/yeffai/contracts /opt/yeffai/evidence",
      "test -d /opt/yeffai/runtime",
      "test -d /opt/yeffai/state",
      "test -d /opt/yeffai/logs",
      "test -d /opt/yeffai/backup",
      "test -d /opt/yeffai/contracts",
      "test -d /opt/yeffai/evidence"
    ],
    "blocked_in_step001": [
      "apt install",
      "docker install",
      "nginx install",
      "ufw public allow",
      "systemctl enable public service",
      "reboot",
      "start application",
      "unrestricted shell",
      "reverse channel"
    ]
  },
  "next_required_action": "VERIFY_YEFFAI_INSTALL_STEP_001_SERVER_BASELINE_CONFIG",
  "observable_registry_action": "ENABLE_YEFFAI_GENERIC_REMOTE_EXECUTOR_AFTER_OPERATOR_APPROVAL",
  "observable_registry_status": "CONTRACTED_BLOCKED",
  "operator_approval_applied": "YES",
  "operator_approval_applied_at": "2026-07-01T20:58:06Z",
  "approval_phrase_applied_exact": "APROVO HABILITAR O EXECUTOR GENÉRICO WARESITES PARA YEFFAI SEM EXECUTAR STEP 001 AINDA",
  "generic_remote_executor_enabled": "NO",
  "remote_yeffai_mutation": "NO",
  "installation_command_executed": "YES",
  "installation_started": "NO",
  "step_001_executed": "YES",
  "step001_execution_approval_gate_registered": "YES",
  "step001_execution_approval_gate_status": "CONTRACTED_BLOCKED",
  "last_step_executed": "YEFFAI_INSTALL_STEP_001_SERVER_BASELINE_CONFIG",
  "last_step_status": "PASS",
  "runtime_next_required_action": "VERIFY_YEFFAI_INSTALL_STEP_001_SERVER_BASELINE_CONFIG",
  "plan_next_required_action": "VERIFY_YEFFAI_INSTALL_STEP_001_SERVER_BASELINE_CONFIG",
  "ledger_required_next_action": "VERIFY_YEFFAI_INSTALL_STEP_001_SERVER_BASELINE_CONFIG",
  "step001_closure_status": "PASS",
  "step001_closed": "YES"
}
